PT-2026-162806
CVE-2026-99839
·
Published
2026-11-30
·
Updated
2026-11-30
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
pidfs: don't let PIDFD GET INFO miss a reaped task
PIDFD GET INFO describes the task while there is one, and with
PIDFD INFO EXIT its exit status once it has been reaped. pidfd info()
looks at the two in the wrong order and can miss both:
pidfd info() release task()
PIDFS ATTR BIT EXIT is not set
pidfs exit()
unhash process()
get pid task() == NULL
goto copy out
The ioctl succeeds with neither PIDFD INFO PID nor PIDFD INFO EXIT in the
mask. If the task is unhashed a little later, after get pid task(), its
pid reads as 0 and the ioctl fails with -ESRCH, although the caller asked
for the exit information and it is available by now.
The second case does not even need an exit. When a sub-thread execs,
de thread() hands the leader's pid over to it and releases the old leader.
A caller that got hold of the old leader reports the tid of the sub-thread
as the pid, or -ESRCH for a process that is alive.
Look up the task first. pidfs exit() runs before the task is unhashed, so
a caller that finds no task finds the exit information; this needs a
barrier on both sides because taking tasklist lock does not order the
store in pidfs exit() against the one in detach pid(). And start over if
the task no longer owns the pid when all the fields have been read: then
there is either exit information or another task.
Go by the pid for that check and for the pid we report, not by
->thread pid of the task. exchange tids() moves the pid to the exec'ing
thread before it updates ->thread pid of either task. A caller that
finds the new leader in between would read the old tid of the sub-thread
from ->thread pid, and a check of ->thread pid would restart until the
exec'ing thread gets to its store. On PREEMPT RT that thread can be
preempted with tasklist lock held and can't move to another CPU. If the
RT task that preempted it calls PIDFD GET INFO, the ioctl spins until
the exec'ing thread gets the CPU back, and that never happens if the
exec'ing thread is an RT task of lower priority.
Christian Brauner brauner@kernel.org says:
Go by @pid instead of ->thread pid of the task for the reported pid and
for the restart check.
Found an issue in the description? Have something to add? Feel free to write us 👾