KernelScan.io

HIGH Public PoC Introduced in 5.7

posix-cpu-timers ExecRace UAF

CVE-2026-64560

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI6.9MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: posix-cpu-timers: Prevent UAF caused by non-leader exec() race Wongi and Jungwoo decoded and reported a non-leader exec() related race which can result in an UAF: sys_timer_delete() exec() posix_cpu_timer_del() // Observes old leader p = pid_task(pid, pid_type); de_thread() switch_leader(); release_task(old_leader) __exit_signal(old_leader) sighand = lock(old_leader, sighand); posix_cpu_timers*_exit(); sighand = lock_task_sighand(p) unhash_task(old_leader); sh = lock(p, sighand) old_leader->sighand = NULL; unlock(sighand); (p->sighand == NULL) unlock(sh) return NULL; // Returns without action if(!sighand) return 0; free_posix_timer(); This is "harmless" unless the deleted timer was armed and enqueued in p->signal because on exec() a TGID targeted timer is inherited. As sys_timer_delete() freed the underlying posix timer object run_posix_cpu_timers() or any timerqueue related add/delete operations on other timers will access the freed object's timerqueue node, which results in an UAF. There is a similar problem vs. posix_cpu_timer_set(). For regular posix timers it just transiently returns -ESRCH to user space, but for the use case in do_cpu_nanosleep() it's the same UAF just that the k_itimer is allocated on the stack. Also posix_cpu_timer_rearm() fails to rearm the timer, which means it stops to expire. While debating solutions Frederic pointed out another problem: posix_cpu_timer_del(tmr) __exit_signal(p) posix_cpu_timers*_exit(p); unhash_task(p); p->sighand = NULL; sh = lock_task_sighand(p) sighand = p->sighand; if (!sighand) return NULL; lock(sighand); if (!sh) WARN_ON_ONCE(timer_queued(tmr)); On weakly ordered architectures it is not guaranteed that posix_cpu_timer_del() will observe the stores in posix_cpu_timers*_exit() when p->sighand is observed as NULL, which means the WARN() can be a false positive. Solve these issues by: 1) Changing the store in __exit_signal() to smp_store_release(). 2) Adding a smp_acquire__after_ctrl_dep() into the !sighand path of lock_task_sighand(). 3) Creating a helper function for looking up the task and locking sighand which does not return when sighand == NULL. Instead it retries the task lookup and only if that fails it gives up. 4) Using that helper in the three affected functions. #1/#2 ensures that the reader side which observes sighand == NULL also observes all preceeding stores, i.e. the stores in posix_cpu_timers*_exit() and the ones in unhash_task(). #3 ensures that the above described non-leader exec() situation is handled gracefully. When the task lookup returns the old leader, but sighand == NULL then it retries. In the non-leader exec() case the subsequent task lookup will observe the new leader due to #1/#2. In normal exit() scenarios the subsequent lookup fails. When the task lookup fails, the function also checks whether the timer is still enqueued and issues a warning if that's the case. Unfortunately there is nothing which can be done about it, but as the task is already not longer visible the timer should not be accessed anymore. This check also requires memory ordering, which is not provided when the first lookup fails. To achieve that the check is preceeded by a smp_rmb() which pairs with the smp_wmb() in write_seqlock() in __exit_signal(). That ensures that the stores in posix_cpu_timers*_exit() are visible. The history of the non-leader exec() issue goes back to the early days of posix CPU timers, which stored a pointer to the group leader task in the timer. That obviously fails when a non-leader exec() switches the leader. commit e0a70217107e ("posix-cpu-timers: workaround to suppress the problems with mt exec") added a temporary workaround for that in 2010 which surv ---truncated---

02

Engine v0.5.0

Risk summary

A use-after-free vulnerability exists in the POSIX CPU timers subsystem when a non-leader thread calls exec() concurrently with timer deletion, set, or rearm operations. Any local user with basic privileges can trigger this race, potentially achieving kernel memory corruption leading to privilege escalation, information disclosure, or denial of service. Systems running untrusted local code, multi-tenant workloads, or container hosts are at highest risk.

Affectedkernel/time/posix-cpu-timers.c (posix-cpu-timers)

Vulnerability analysis

The root cause is a race condition between POSIX CPU timer operations (posix_cpu_timer_del, posix_cpu_timer_set, posix_cpu_timer_rearm) and a non-leader exec(). When a non-leader thread exec()'s, de_thread() switches the thread group leader and __exit_signal() sets the old leader's sighand to NULL. If a timer operation observes the old leader via pid_task() but then finds sighand==NULL in lock_task_sighand(), it returns without dequeuing the timer from the signal structure. The caller then frees the k_itimer object while its timerqueue node remains enqueued, causing a UAF when run_posix_cpu_timers() or other timerqueue operations traverse the list. The fix introduces a new timer_lock_sighand() helper that retries the pid_task() lookup when sighand is NULL — in the exec() case the retry finds the new leader, and in the exit() case the lookup fails gracefully. Additionally, smp_store_release() on the sighand=NULL store and smp_acquire__after_ctrl_dep() on the read side ensure proper memory ordering so that all prior state changes (posix_cpu_timers*_exit, unhash_task) are visible when sighand==NULL is observed. The attack surface is any local process with access to POSIX timer syscalls and exec(), requiring a local user account but no special capabilities.

Exploit availability

KernelScan found public exploit code for this CVE. Open it in the CVE browser to see what we found, where, and how strong the evidence is — that needs a free account with a confirmed email address.

03

BranchIntroducedFixed inPatch commit
5.105.75.10.26267aa823e3e8c
5.155.75.15.213d8bcb28abad8
6.15.76.1.180cc35ddbc4973
6.125.76.12.100e74443f5db00
6.185.76.18.416a7ecc25abe6
6.65.76.6.14712a891c773ae
7.15.77.1.5ad1cafa1bdaa
mainline5.77.2920f893f735e
cip/5.105.75.10.263-cip7667aa823e3e8c
cip/5.10-rt5.75.10.268-cip77-rt3467aa823e3e8c
cip/6.15.76.1.182-cip59cc35ddbc4973
cip/6.1-rt5.76.1.182-cip59-rt31cc35ddbc4973
cip/6.125.76.12.101-cip29e74443f5db00

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.101-cip29
cip/6.1Fixed in 6.1.182-cip59
cip/6.1-rtFixed in 6.1.182-cip59-rt31
cip/5.10Fixed in 5.10.263-cip76
cip/5.10-rtFixed in 5.10.268-cip77-rt34