CriticalCVE-2025-38352

    Linux Kernel Time-of-Check Time-of-Use (TOCTOU) Race Condition Vulnerability (CVE-2025-38352)

    Published Last modified In CISA KEV since Sources: Ubuntu, OSV, Debian LTS, CVE.org, SUSE, Msrc Update Guide, EUVD, pwn.watch, Debian

    What is affected, what to do

    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.

    The vulnerability is being actively exploited; treat it as a priority. Update Linux Kernel to version 5.4.295, Linux Kernel to version 5.10.239, Linux Kernel to version 5.15.186. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • Linux Kernel lt 2.6.36..5.4.295
    • Linux Kernel lt 5.5..5.10.239
    • Linux Kernel lt 5.11..5.15.186
    • Linux Kernel lt 5.16..6.1.142
    • Linux Kernel lt 6.2..6.6.94
    • Linux Kernel lt 6.7..6.12.34
    • Linux Kernel lt 6.13..6.15.3
    Fixed in
    • Linux Kernel 5.4.295
    • Linux Kernel 5.10.239
    • Linux Kernel 5.15.186
    • Linux Kernel 6.1.142
    • Linux Kernel 6.6.94
    • Linux Kernel 6.12.34
    • Linux Kernel 6.15.3
    • Linux Kernel 6.16

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    7.8

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    7.8

    CVSS v3

    Severity High on the scale from 0 to 10.

    Source: Ubuntu, OSV, Debian LTS, CVE.org, SUSE, Msrc Update Guide, EUVD, pwn.watch, Debian

    1.4 %

    EPSS score

    Moderate — model estimates 1-10% exploitation likelihood.

    Source: FIRST EPSS, percentile 71.7

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    190.05 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploitedSource: VulnCheck KEV (opens in a new tab) How we classify
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    7.8 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    7.8
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    1.4 %
    Moderate — model estimates 1-10% exploitation likelihood.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    71.7
    High — this CVE ranks above the median of all CVEs scored today (rank ≥ 36%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · not automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 5 September 2025
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-367

    Response and mitigation

    Why act now?

    Prioritisation rationale

    This is a local privilege escalation: the attacker needs low-privileged code execution first, no user interaction is required, and success gives full compromise of confidentiality, integrity and availability on the host. In practice it is a second-stage primitive, chained after initial access via a web app, stolen credentials, a malicious app, or a container foothold. Exploitation looks targeted rather than mass-scale, which matches the moderate exploitation likelihood, and CISA does not flag ransomware use. Treat it as high priority (patch within days) wherever you run multi-tenant Linux, Kubernetes, CI/CD or Android fleets; single-purpose servers that never run third-party code can go into an accelerated regular patch cycle.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Inventory kernels: Pull uname -r from every Linux host through config management or EDR inventory and compare against the fixed releases: 5.4.295, 5.10.239, 5.15.186, 6.1.142, 6.6.94, 6.12.34, 6.15.3, or 6.16+. Everything from 2.6.36 below those releases is affected.
      • Patch and reboot: Install a distribution kernel that carries the backport of "posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()". Distro package versions differ from upstream numbering, so check the vendor advisory (RHEL, SUSE, Debian, Ubuntu, etc.) for the exact package version.
      • Patch in order of exposure: Start with hosts that run untrusted local code: multi-user servers, bastions, CI/CD runners, Kubernetes workers, container hosts, and shared hosting. Containers share the host kernel and are no barrier here.
      • Live-patch where a reboot must wait: Check kpatch, Canonical Livepatch, SUSE Live Patching or KernelCare for a CVE-2025-38352 livepatch.
      • Check kernel config: Run grep CONFIG_POSIX_CPU_TIMERS_TASK_WORK /boot/config-$(uname -r). Per the upstream fix, the race path is not reachable when this is =y. Hosts without it, typically older kernels and some architectures or embedded/Android kernels, move up the queue. Patch them anyway.
      • Mobile and embedded fleets: For Android and appliance kernels built on Linux, verify the security patch level against the vendor bulletin. Use MDM to gate unpatched devices out of sensitive access.
    2. Runbook step 2

      Mitigation layers

      • Seccomp (endpoint/container hardening): For untrusted workloads, deploy a custom seccomp profile that denies timer_create with CPU clocks. That covers CLOCK_PROCESS_CPUTIME_ID (2), CLOCK_THREAD_CPUTIME_ID (3) and negative PID-encoded clockids. The default Docker/containerd profiles allow these calls. Test for regressions first, since some profilers and runtimes use CPU timers.
      • Restrict ptrace/debugging: The exploit path relies on a parent or debugger reaping the exiting task. Set kernel.yama.ptrace_scope=2, or 3 on servers that never need debugging, and drop CAP_SYS_PTRACE from containers. This narrows the path but does not close it.
      • IAM / least privilege: Cut interactive shell access to what operations actually need. Set unprivileged service accounts to nologin. Mount /tmp, /dev/shm and /var/tmp with noexec.
      • Execution control: Use fapolicyd, or SELinux/AppArmor in enforcing mode, to stop web and app service accounts from dropping and running unknown binaries (exploit stagers).
      • Segmentation: Isolate unpatched multi-tenant hosts. Put CI runners in a dedicated VLAN with no reach to secrets stores or production, so a local root escalation stays contained.
    3. Runbook step 3

      Detection rules

      • Kernel crash artefacts (journald/dmesg into SIEM): Hunt for BUG:, KASAN: use-after-free, general protection fault or Oops with stack frames in posix_cpu_timer_del, handle_posix_cpu_timers or run_posix_cpu_timers. Failed race attempts often panic or oops the box. SPL: index=linux sourcetype=syslog ("posix_cpu_timer" OR "handle_posix_cpu_timers") ("BUG" OR "use-after-free" OR "Oops")
      • Syscall patterns (auditd): Add -a always,exit -F arch=b64 -S timer_create -F a0=2 -k cpu_timer, plus the same rule for a0=3. Treat high-rate timer_create/timer_delete from an unprivileged process as suspicious when it comes with bursts of short-lived children and wait4/ptrace. Baseline first.
      • Privilege escalation without a setuid path (EDR / Sysmon for Linux EID 1 / auditd): Look for a process with euid=0 whose parent runs as UID ≥ 1000 or a service account, with no sudo, su, pkexec or other setuid binary in the ancestry. Sigma shape: selection: User=root AND ParentUser!=root AND NOT ParentImage|endswith: ['/sudo','/su','/pkexec'].
      • Exploit staging: Watch for new ELF files written to and then executed from /tmp, /dev/shm or service-account home directories (auditd -w /tmp -p x, Falco "Execution from /tmp"), especially on web servers and container hosts.
      • Post-exploitation: Watch for writes to /etc/passwd, /etc/sudoers or ~root/.ssh/authorized_keys, new kernel module loads (init_module/finit_module in auditd), or auditd/EDR agents stopping shortly after a kernel oops.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    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.

    Source: Ubuntu Security Notices, OSV (Open Source Vulnerabilities), Debian LTS Advisories, cvelistv5, suse_csaf, Microsoft Security Update Guide, ENISA EUVD, pwn.watch, NVD (NIST), CISA KEV Catalog, CVE.org (MITRE), Debian Security Advisories

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    LinuxLinux
    • —
    • 6.2 – < 6.6.94
    • 5.16 – < 6.1.142
    • 5.11 – < 5.15.186
    • 5.5 – < 5.10.239
    • 6.13 – < 6.15.3
    • 6.7 – < 6.12.34
    • 2.6.36 – < 5.4.295
    • 6.16
    • 6.6.94
    • 6.1.142
    • 5.15.186
    • 5.10.239
    • 6.15.3
    • 6.12.34
    • 5.4.295
    android:linux_kernel:
    • :0
    • Kernel
    • :2025-09-05
    • —

    Vendors and products

    Affected operating systems

    Affected operating systems
    Linuxdebiandebian_linux11.0
    Linuxdebianlinuxbookworm
    Linuxdebianlinuxbullseye
    Linuxdebianlinux-6.1bullseye
    Linuxlinuxlinux_kernel6.16
    Linuxlinuxlinux_kernel—

    Weakness classes (CWE)

    • CWE-367Time-of-check Time-of-use (TOCTOU) Race Condition

      Base

      The product 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.

      Entry at MITRE CWE-367

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited
    Reference tagged as exploitgithub.com (opens in a new tab)PoC (publicly reported)reported, not verified—
    PoC-in-GitHub (nomi-sec)CVE-2025-38352-PoC (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)chronomaly-webos (opens in a new tab)github.comPoC (publicly reported)reported, not verified

    References & sources

    Changes to this CVE

    Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).

    1. NVD analysis modifiedNVD

    2. Record modifiedLinux

      Show 24 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      https://git.kernel.org/stable/c/2c72fe18cc5f9f1750f5bc148cf1c94c29e106ff
      Referenceadded
      —
      https://git.kernel.org/stable/c/2f3daa04a9328220de46f0d5c919a6c0073a9f0b
      Referenceadded
      —
      https://git.kernel.org/stable/c/460188bc042a3f40f72d34b9f7fc6ee66b0b757b
      Referenceadded
      —
      https://git.kernel.org/stable/c/764a7a5dfda23f69919441f2eac2a83e7db6e5bb
      Referenceadded
      —
      https://git.kernel.org/stable/c/78a4b8e3795b31dae58762bc091bb0f4f74a2200
      Referenceadded
      —
      https://git.kernel.org/stable/c/c076635b3a42771ace7d276de8dc3bc76ee2ba1b
      Referenceadded
      —
      https://git.kernel.org/stable/c/c29d5318708e67ac13c1b6fc1007d179fb65b4d7
      Referenceadded
      —
      https://git.kernel.org/stable/c/f90fff1e152dedf52b932240ebbd670d83330eca
      Referenceremoved
      https://git.kernel.org/stable/c/2c72fe18cc5f9f1750f5bc148cf1c94c29e106ff
      —
      Referenceremoved
      https://git.kernel.org/stable/c/2f3daa04a9328220de46f0d5c919a6c0073a9f0b
      —
      Referenceremoved
      https://git.kernel.org/stable/c/460188bc042a3f40f72d34b9f7fc6ee66b0b757b
      —
      Referenceremoved
      https://git.kernel.org/stable/c/764a7a5dfda23f69919441f2eac2a83e7db6e5bb
      —
      Referenceremoved
      https://git.kernel.org/stable/c/78a4b8e3795b31dae58762bc091bb0f4f74a2200
      —
      Referenceremoved
      https://git.kernel.org/stable/c/c076635b3a42771ace7d276de8dc3bc76ee2ba1b
      —
      Referenceremoved
      https://git.kernel.org/stable/c/c29d5318708e67ac13c1b6fc1007d179fb65b4d7
      —
      Referenceremoved
      https://git.kernel.org/stable/c/f90fff1e152dedf52b932240ebbd670d83330eca
      —
      Reference typeremoved
      https://git.kernel.org/stable/c/2c72fe18cc5f9f1750f5bc148cf1c94c29e106ff Types: Patch
      —
      Reference typeremoved
      https://git.kernel.org/stable/c/2f3daa04a9328220de46f0d5c919a6c0073a9f0b Types: Patch
      —
      Reference typeremoved
      https://git.kernel.org/stable/c/460188bc042a3f40f72d34b9f7fc6ee66b0b757b Types: Patch
      —
      Reference typeremoved
      https://git.kernel.org/stable/c/764a7a5dfda23f69919441f2eac2a83e7db6e5bb Types: Patch
      —
      Reference typeremoved
      https://git.kernel.org/stable/c/78a4b8e3795b31dae58762bc091bb0f4f74a2200 Types: Patch
      —
      Reference typeremoved
      https://git.kernel.org/stable/c/c076635b3a42771ace7d276de8dc3bc76ee2ba1b Types: Patch
      —
      Reference typeremoved
      https://git.kernel.org/stable/c/c29d5318708e67ac13c1b6fc1007d179fb65b4d7 Types: Patch
      —
      Reference typeremoved
      https://git.kernel.org/stable/c/f90fff1e152dedf52b932240ebbd670d83330eca Types: Patch
      —

      Source identifier: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    3. Record modifiedCISA ADP

      Show 7 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      CVSSremoved
      AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
      —
      Referenceadded
      —
      https://github.com/farazsth98/chronomaly
      Referenceadded
      —
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-38352
      Referenceremoved
      https://github.com/farazsth98/chronomaly
      —
      Referenceremoved
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-38352
      —
      Reference typeremoved
      https://github.com/farazsth98/chronomaly Types: Exploit
      —
      Reference typeremoved
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-38352 Types: US Government Resource
      —

      Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0

    4. Record modifiedCVE Program

      Show 6 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html
      Referenceadded
      —
      https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html
      Referenceremoved
      https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html
      —
      Referenceremoved
      https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html
      —
      Reference typeremoved
      https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html Types: Mailing List, Third Party Advisory
      —
      Reference typeremoved
      https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html Types: Mailing List, Third Party Advisory
      —

      Source identifier: af854a3a-2127-422b-91ae-364da2661108

    5. Record modifiedLinux

      CVSS V3.1: AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

      Show the original change
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      CVSSadded
      —
      AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

      Source identifier: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2025-38352
    <a href="https://intel.neosec.eu/en/cve/CVE-2025-38352"><img src="https://intel.neosec.eu/badge/cve/CVE-2025-38352.svg?lang=en" alt="CVE-2025-38352 – NEOSEC Intel" height="20"></a>