Look up another CVE · open CVE-2025-38352 in the interactive tracker
CVE-2025-38352
posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()
Published 2025-07-22 (15 months ago) by the Linux kernel CNA. Subsystem kernel/time. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-38352 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | fixedDSA-5973-1 · 2025-08-12 · text | 6.1.147-1 | Update the kernel and reboot. DSA-5973-1 shipped the fix on 2025-08-12, in 6.1.147-1. A running kernel keeps the old code until the machine restarts. |
| Debian 13trixie | fixed | 6.12.35-1 | Update the kernel and reboot. Fixed in 6.12.35-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.35-1 | Update the kernel and reboot. Fixed in 6.12.35-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.35-1 | Update the kernel and reboot. Fixed in 6.12.35-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
If an exiting non-autoreaping task has already passed exit_notify() and calls handle_posix_cpu_timers() from IRQ, it can be reaped by its parent or debugger right after unlock_task_sighand(). If a concurrent posix_cpu_timer_del() runs at that moment, it won't be able to detect timer->it.cpu.firing != 0: cpu_timer_task_rcu() and/or lock_task_sighand() will fail. Add the tsk->exit_state check into run_posix_cpu_timers() to fix this. This fix is not needed if CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y, because exit_task_work() is called before exit_notify(). But the check still makes sense, task_work_add(&tsk->posix_cputimers_work.work) will fail anyway in this case.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
kernel/time/posix-cpu-timers.c
- What this is
- POSIX CLOCKS and TIMERSMAINTAINERS section matched on kernel/time/posix-* · linux-kernel@vger.kernel.org · Maintained
Check it on the machine
grep -w CONFIG_POSIX_TIMERS /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
Show whether Debian builds this, per release
Debian builds this code. Every release below compiles the affected file into the kernels it ships.
- bookworm, trixie, forky, sidy
- y
- built into the kernel image on every flavour - only a patch removes it
- Build switch
- CONFIG_POSIX_TIMERS
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Known to be exploited in the wild
- Added to KEV
- 2025-09-04
- Federal due date
- 2025-09-25
- Ransomware use
- unknown
- Required action
- Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Signals
- Published
- 2025-07-22 (15 months ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 1.34%, higher than 70.9% of all CVEssource
- CISA KEV
- listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- kernel/time
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 2.6.36 | 5.4.295 | 78a4b8e3795b |
| 2.6.36 | 5.10.239 | c076635b3a42 |
| 2.6.36 | 5.15.186 | 2f3daa04a932 |
| 2.6.36 | 6.1.142 | 764a7a5dfda2 |
| 2.6.36 | 6.6.94 | 2c72fe18cc5f |
| 2.6.36 | 6.12.34 | c29d5318708e |
| 2.6.36 | 6.15.3 | 460188bc042a |
| 2.6.36 | 6.16 | f90fff1e152d |
Debian advisories
| Advisory | Date | Shipped to | Debian |
|---|---|---|---|
| DLA-4328-1 | 2025-10-13 | bullseye 6.1.153-1~deb11u1 | tracker |
| DLA-4327-1 | 2025-10-13 | bullseye 5.10.244-1 | tracker |
| DSA-5973-1 | 2025-08-12 | bookworm 6.1.147-1 | tracker |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerability is reached purely through local syscalls — `timer_create`/`timer_settime`/`timer_delete` (or `clock_nanosleep`) plus `ptrace`/`waitpid` to control task reaping — with the trigger arriving via the local timer tick. There is no network-facing path into posix-cpu-timers.
- AC:LAttack complexity, low
- The attacker controls both sides of the race: it arms the CPU timer expiry, chooses the precise moment of `release_task()` by calling `waitpid()` from its own parent/tracer, and issues the concurrent `timer_delete()` from a sibling thread — retryable in a tight loop and widenable by queueing up to 20 timers on the firing list. Real-world exploitation of this exact bug confirms it is reliably winnable.
- PR:LPrivileges required, low
- No capability or permission check exists anywhere on the path — `validate_clock_permissions()`/`pid_for_clock()` gate only on thread-group/pid existence, and `grep` for `capable`/`CAP_` in both posix-timers files returns nothing. Any unprivileged local user, including a seccomp-confined Android app UID, can reach it.
- UI:NUser interaction, none
- The attacker's own processes and threads perform every step — creating the timer, exiting the traced thread, reaping it, and deleting the timer. No victim action of any kind is needed.
- S:UScope, unchanged
- The use-after-free corrupts kernel heap objects and escalates within the kernel's own security authority, which is standard kernel privilege escalation. No hypervisor, IOMMU, or other security-authority boundary is crossed.
- C:HConfidentiality impact, high
- The freed `struct sigqueue` is linked into the signal pending list by `send_sigqueue()` and later copied out to userspace through `dequeue_signal()`/`rt_sigtimedwait()`, disclosing whatever now occupies the reclaimed slab object — an effectively arbitrary kernel-memory read. The `do_cpu_nanosleep()` variant additionally exposes reclaimed kernel stack.
- I:HIntegrity impact, high
- `send_sigqueue()` writes into the freed object (`q->info.si_overrun++`) and performs a `list_add_tail()` linked-list insertion on attacker-resprayable memory, followed by a double free on dequeue — a classic controlled-write primitive leading to full privilege escalation, as demonstrated by in-the-wild exploitation of this flaw.
- A:HAvailability impact, high
- Even without successful exploitation the race causes `BUG_ON(!(q->flags & SIGQUEUE_PREALLOC))` in `send_sigqueue()`, `WARN_ON_ONCE()` in the delete path, list corruption, and a double free — any of which oops or panic the kernel. Spinning the race is trivially repeatable as a denial of service.