RACE Between handle_posix_cpu_timers() and posix_cpu_timer_del() in Linux Kernel
CVE-2025-38352 Published on July 22, 2025
posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()
In the Linux kernel, the following vulnerability has been resolved:
posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()
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.
Known Exploited Vulnerability
This Linux Kernel Time-of-Check Time-of-Use (TOCTOU) Race Condition Vulnerability is part of CISA's list of Known Exploited Vulnerabilities. Linux kernel contains a time-of-check time-of-use (TOCTOU) race condition vulnerability that has a high impact on confidentiality, integrity, and availability.
The following remediation steps are recommended / required by September 25, 2025: Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Vulnerability Analysis
CVE-2025-38352 is exploitable with local system access, and does not require authorization privileges or user interaction. This vulnerability is consided to have a high level of attack complexity. This vulnerability is known to be actively exploited by threat actors. The potential impact of an exploit of this vulnerability is considered to be very high.
Weakness Type
What is a TOCTTOU Vulnerability?
The software checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. This can cause the software to perform invalid actions when the resource is in an unexpected state. This weakness can be security-relevant when an attacker can influence the state of the resource between check and use. This can happen with shared resources such as files, memory, or even variables in multithreaded programs.
CVE-2025-38352 has been classified to as a TOCTTOU vulnerability or weakness.
Products Associated with CVE-2025-38352
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2025-38352 are published in these products:
Affected Versions
Linux:- Version 0bdd2ed4138ec04e09b4f8165981efc99e439f55 and below 78a4b8e3795b31dae58762bc091bb0f4f74a2200 is affected.
- Version 0bdd2ed4138ec04e09b4f8165981efc99e439f55 and below c076635b3a42771ace7d276de8dc3bc76ee2ba1b is affected.
- Version 0bdd2ed4138ec04e09b4f8165981efc99e439f55 and below 2f3daa04a9328220de46f0d5c919a6c0073a9f0b is affected.
- Version 0bdd2ed4138ec04e09b4f8165981efc99e439f55 and below 764a7a5dfda23f69919441f2eac2a83e7db6e5bb is affected.
- Version 0bdd2ed4138ec04e09b4f8165981efc99e439f55 and below 2c72fe18cc5f9f1750f5bc148cf1c94c29e106ff is affected.
- Version 0bdd2ed4138ec04e09b4f8165981efc99e439f55 and below c29d5318708e67ac13c1b6fc1007d179fb65b4d7 is affected.
- Version 0bdd2ed4138ec04e09b4f8165981efc99e439f55 and below 460188bc042a3f40f72d34b9f7fc6ee66b0b757b is affected.
- Version 0bdd2ed4138ec04e09b4f8165981efc99e439f55 and below f90fff1e152dedf52b932240ebbd670d83330eca is affected.
- Version 2.6.36 is affected.
- Before 2.6.36 is unaffected.
- Version 5.4.295, <= 5.4.* is unaffected.
- Version 5.10.239, <= 5.10.* is unaffected.
- Version 5.15.186, <= 5.15.* is unaffected.
- Version 6.1.142, <= 6.1.* is unaffected.
- Version 6.6.94, <= 6.6.* is unaffected.
- Version 6.12.34, <= 6.12.* is unaffected.
- Version 6.15.3, <= 6.15.* is unaffected.
- Version 6.16, <= * is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.