Skip to contentSkip to conversation

CVE-2026-98258: posix-cpu-timers: Prevent freeing a timer which is queued on the expiry list

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 6

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-98258 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.13 with commit bf635681c906ad056d1fda325de8d1c12c9f8201 and fixed in 6.18.54 with commit 9971dac1a77845ff467146915fcbb9170f6a8209
	Issue introduced in 6.13 with commit bf635681c906ad056d1fda325de8d1c12c9f8201 and fixed in 7.2.8 with commit 4336e3f47d9d516441066e9a65eaf076790d8d45
	Issue introduced in 6.13 with commit bf635681c906ad056d1fda325de8d1c12c9f8201 and fixed in 7.3-rc4 with commit c21eaa72f02fc6e85621cbe09d303d8fb8bd39cd

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98258

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
kernel/time/posix-cpu-timers.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/9971dac1a77845ff467146915fcbb9170f6a8209
	https://git.kernel.org/stable/c/4336e3f47d9d516441066e9a65eaf076790d8d45
	https://git.kernel.org/stable/c/c21eaa72f02fc6e85621cbe09d303d8fb8bd39cd