HIGH Introduced in 6.13
posix-cpu-timers ExpiryList UAF
CVE-2026-98258
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.9MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: posix-cpu-timers: Prevent freeing a timer which is queued on the expiry list Kijo analyzed another race in the POSIX CPU timer code: Commit bf635681c906 converted cpu_timer::firing from a tristate value to a boolean. This lost the distinction between "not owned by the firing list" and "still owned, but delivery was canceled". The resulting race is: expiry handler timer_settime() timer_delete() -------------- --------------- -------------- collect timer onto private firing list firing = true observes firing = true firing = false return TIMER_RETRY wait for handler observes firing = false finish deletion unhash and free timer resume list traversal read freed elist.next -> UAF The firing bit is clearly the wrong indicator since that commit. Check whether the timer is queued on the expiry list or not instead. If it is queued clear the firing bit to prevent signal delivery as before and return TIMER_RETRY so the caller unlocks the timer which allows the expiry code to make progress and remove it from the list.
02KernelScan AI Analysis
Risk summary
A race condition in the POSIX CPU timer subsystem allows an unprivileged local user to trigger a use-after-free by concurrently manipulating a timer while the expiry handler is processing it. This can lead to kernel memory corruption, potentially enabling privilege escalation, arbitrary code execution, or system crash. Any system with local untrusted users is at risk.
Vulnerability analysis
A race condition exists in the POSIX CPU timer code where the timer expiry handler collects timers onto a private firing list, but a concurrent timer deletion or rearm operation can observe a stale boolean flag and proceed to free the timer while the expiry handler is still traversing that list, resulting in a use-after-free. The root cause is that a prior cleanup commit converted the firing state from a tristate to a boolean, losing the distinction between a timer that is no longer on the expiry list and one whose delivery was merely canceled. The fix replaces the boolean check with a direct test of whether the timer is still queued on the expiry list, returning a retry indicator so the caller releases the lock and allows the expiry handler to safely remove the timer first. Any unprivileged local user can trigger this via standard POSIX timer syscalls — no special capabilities, hardware, or configuration are required.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.13 | 6.18.54 | 9971dac1a778 |
| 7.2 | 6.13 | 7.2.8 | 4336e3f47d9d |
| mainline | 6.13 | 7.3 | c21eaa72f02f |