CVE-2026-98163

Severity CVSS v4.0:
Pending analysis
Type:
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
26/09/2026
Last modified:
19/10/2026

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> cgroup: Avoid iteration of dying tasks with zero refcount<br /> <br /> The commit 260fbcb92bbea ("cgroup: Move dying_tasks cleanup from<br /> cgroup_task_release() to cgroup_task_free()") extended the lifetime of<br /> tasks on the dying_tasks list.<br /> The iterators have provision to go through dying_tasks because of<br /> dying threadgroup leaders or explicit CSS_TASK_ITER_WITH_DEAD, however,<br /> it was expected that such tasks can obtain a new reference (that is<br /> possible before cgroup_task_release()/put_task_struct_rcu_user()).<br /> The tasks after cgroup_task_release() and before cgroup_task_free()<br /> are subject to race when they may or may not have -&gt;usage count &gt; 0.<br /> <br /> The race window is between css_task_iter_next() invocations<br /> when css_set_lock is released and we may arrive at a new -&gt;task_pos.<br /> The iterator should not attempt to resurrect tasks whose -&gt;usage count<br /> dropped to zero. (When that happens, __put_task_struct_rcu_cb() is<br /> already imminent and the returned task_struct would could be used<br /> after free.)<br /> <br /> As for the fix, we cannot simply check the signal-&gt;live count of a task<br /> on the dying list because that won&amp;#39;t distinguish regular zombies waiting<br /> to be reaped from RCU remnant tasks that are going to be free&amp;#39;d.<br /> Therefore add an extra check to rule out -&gt;usage==0 tasks from any<br /> iteration.<br /> <br /> The repeat: loop in css_task_iter_advance() doesn&amp;#39;t consider -&gt;usage<br /> count, so add a new loop to css_task_iter_next() to skip de-used tasks<br /> on the dying_list.<br /> <br /> Rough illustration of the possible race<br /> <br /> R (reader of cgroup.procs) T (thread) L (group leader)<br /> --------------------------------- -------------------------------- --------------------------------<br /> L exits, signal-&gt;live &gt; 0<br /> cgroup_task_dead(L)<br /> css_set_skip_task_iters() // skips only cset-&gt;tasks<br /> list_add_tail(&amp;L-&gt;cg_list, &amp;cset-&gt;dying_tasks)<br /> css_task_iter_next()<br /> take css_set_lock<br /> css_task_iter_advance()<br /> leader &amp;&amp; signal-&gt;live != 0<br /> =&gt; it-&gt;task_pos = &amp;L-&gt;cg_list<br /> release css_set_lock<br /> T exits<br /> --signal-&gt;live == 0<br /> cgroup_task_dead(T) // css_set_lock<br /> release_task(T)<br /> cgroup_task_release(T)<br /> release_task(L) // zap_leader<br /> cgroup_task_release(L)<br /> put_task_struct_rcu_user(L)<br /> ...RCU...<br /> put_task_struct(L)<br /> L-&gt;usage = 0<br /> /* L still on dying_tasks */<br /> ...RCU...<br /> __put_task_struct(L)<br /> css_task_iter_next() // another iteration<br /> take css_set_lock<br /> it-&gt;task_pos = &amp;L-&gt;cg_list<br /> get_task_struct(L)<br /> =&gt; addition on 0<br /> drop css_set_lock<br /> cgroup_task_free(L)<br /> css_set_skip_task_iters() // dying skip comes too late<br /> free_task(L)<br /> cgroup_procs_show()<br /> task_pid_vnr(L)

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19 (including) 7.2.8 (excluding)
cpe:2.3:o:linux:linux_kernel:7.3:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.3:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.3:rc3:*:*:*:*:*:*