CVE-2026-98258: posix-cpu-timers: Prevent freeing a timer which is queued on the expiry list
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 cputimer::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 timersettime() timerdelete() -------------- --------------- -------------- collect timer onto private firing list firing = true observes firing = true firing = false return TIMERRETRY 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 TIMERRETRY so the caller unlocks the timer which allows the expiry code to make progress and remove it from the list.
Affected Software
Event History
Frequently Asked Questions
Who can realistically trigger this issue?
The CVSS vector indicates local access and low privileges are required. It is not described as remotely exploitable or requiring user interaction.
What race condition is required for exploitation?
The issue requires a POSIX CPU timer expiry handler to race with timer_settime() and timer_delete(). The timer can be freed while the expiry handler still traverses the expiry list, causing a use-after-free when it reads the freed timer's elist.next pointer.
What is the potential impact if the race is triggered?
The vulnerability is rated high severity with high confidentiality, integrity, and availability impact in the supplied CVSS vector. The underlying condition is a kernel use-after-free.