CVE-2025-39859
High · 7.8CVSS
7.8
EPSS
0.2%
Published
Sep 19, 2025
CISA due date
—
Cloudanix analysis
A timing flaw in Linux PTP hardware support can let the system crash or be taken over when certain network timing devices are removed.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition in ptp_ocp_detach allows the watchdog timer handler to access a ptp_ocp structure after devlink_free has deallocated it, causing a use-after-free.
Why it matters to the business
Systems using PTP OCP hardware may experience kernel instability, crashes, or potential local privilege escalation during device removal or driver unload, with moderate urgency due to low EPSS and absence from KEV lists.
How an attack unfolds
An attacker with local access triggers concurrent ptp_ocp_remove and ptp_ocp_watchdog execution; the timer handler dereferences freed memory after the detach path skips timer_delete_sync when the handler is already active.
How to fix it
Upgrade the Linux kernel to the commit f10d3c7267ac7387a5129d5506c3c5f2460cfd9b or later stable releases that unconditionally call timer_delete_sync in ptp_ocp_detach.
How to confirm the fix worked
Verify the presence of commit f10d3c7267ac7387a5129d5506c3c5f2460cfd9b in the running kernel source; exercise ptp_ocp attach/detach paths under load and confirm no timer-related UAF warnings in kernel logs.
Typical attack path
- Obtain local code execution on a system exposing ptp_ocp devices
- Trigger device removal or module unload while the watchdog timer is armed
- Win the race so the handler runs after devlink_free but before any synchronization
- Access the dangling bp pointer to achieve use-after-free read or write
How to detect it
Inspect kernel logs for use-after-free warnings or KASAN reports referencing ptp_ocp_watchdog or devlink_free; correlate with ptp_ocp module load/unload events.
What your security team should do
- Prioritize kernel updates on any hosts exposing ptp_ocp hardware within standard change windows
- Monitor upstream stable branches for backports of the timer synchronization fix
- Review device removal code paths in similar timer-using drivers for analogous races
The record
In the Linux kernel, the following vulnerability has been resolved: ptp: ocp: fix use-after-free bugs causing by ptp_ocp_watchdog The ptp_ocp_detach() only shuts down the watchdog timer if it is pending. However, if the timer handler is already running, the timer_delete_sync() is not called. This leads to race conditions where the devlink that contains the ptp_ocp is deallocated while the timer handler is still accessing it, resulting in use-after-free bugs. The following details one of the race scenarios. (thread 1) | (thread 2) ptp_ocp_remove() | ptp_ocp_detach() | ptp_ocp_watchdog() if (timer_pending(&bp->watchdog))| bp = timer_container_of() timer_delete_sync() | | devlink_free(devlink) //free | | bp-> //use Resolve this by unconditionally calling timer_delete_sync() to ensure the timer is reliably deactivated, preventing any access after free.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Chainguard | hyperv-daemons-6.12 | 0 | 6.12.62-r0 |
| Chainguard | linux-aws-6.12-boot-installed | 0 | 6.12.62-r0 |
| Chainguard | linux-aws-6.12-fips-boot-installed | 0 | 6.12.62-r0 |
| Chainguard | linux-aws-6.12-headers | 0 | 6.12.62-r0 |
| Chainguard | linux-aws-6.12-modules | 0 | 6.12.62-r0 |
| Chainguard | linux-azure-6.12-boot-installed | 0 | 6.12.62-r0 |
| Chainguard | linux-azure-6.12-fips-boot-installed | 0 | 6.12.62-r0 |
| Chainguard | linux-azure-6.12-headers | 0 | 6.12.62-r0 |
| Chainguard | linux-azure-6.12-modules | 0 | 6.12.62-r0 |
| Chainguard | linux-gcp-6.12-boot-installed | 0 | 6.12.62-r0 |
| Chainguard | linux-gcp-6.12-fips-boot-installed | 0 | 6.12.62-r0 |
| Chainguard | linux-gcp-6.12-headers | 0 | 6.12.62-r0 |
| Chainguard | linux-gcp-6.12-modules | 0 | 6.12.62-r0 |
| Chainguard | linux-qemu-6.12-boot-installed | 0 | 6.12.63-r0 |
| Chainguard | linux-qemu-6.12-fips-boot-installed | 0 | 6.12.63-r0 |
| Chainguard | linux-qemu-6.12-headers | 0 | 6.12.63-r0 |
| Chainguard | linux-qemu-6.12-modules | 0 | 6.12.63-r0 |
| Chainguard | linux-vmware-6.12 | 0 | 6.12.67-r0 |
| Chainguard | linux-vmware-6.12-boot-installed | 0 | 6.12.63-r0 |
| Chainguard | linux-vmware-6.12-fips-boot-installed | 0 | 6.12.63-r0 |
| Chainguard | linux-vmware-6.12-headers | 0 | 6.12.63-r0 |
| Chainguard | linux-vmware-6.12-modules | 0 | 6.12.63-r0 |
| Debian:12 | linux | 0 | No fix |
| Debian:13 | linux | 0 | No fix |
| Debian:14 | linux | 0 | 6.16.6-1 |
| Linux | Kernel | 5.15.0 | 6.16.6 |
| SUSE:Linux Enterprise High Availability Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.81.3 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.81.3 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_18 | 0 | 1-150600.1.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_18 | 0 | 1-150600.13.3.3 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-64kb | 0 | 6.4.0-150600.23.81.3 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.81.3 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default-base | 0 | 6.4.0-150600.23.81.3.150600.12.36.3 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.81.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.81.3 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-docs | 0 | 6.4.0-150600.23.81.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-obs-build | 0 | 6.4.0-150600.23.81.3 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.81.2 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-syms | 0 | 6.4.0-150600.23.81.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.81.3 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-azure | 0 | 6.4.0-150600.8.58.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-source-azure | 0 | 6.4.0-150600.8.58.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-syms-azure | 0 | 6.4.0-150600.8.58.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.81.3 |
| SUSE:Real Time Module 15 SP6 | kernel-rt | 0 | 6.4.0-150600.10.61.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt_debug | 0 | 6.4.0-150600.10.61.1 |
| SUSE:Real Time Module 15 SP6 | kernel-source-rt | 0 | 6.4.0-150600.10.61.1 |
| SUSE:Real Time Module 15 SP6 | kernel-syms-rt | 0 | 6.4.0-150600.10.61.1 |
| openSUSE:Leap 15.6 | dtb-aarch64 | 0 | 6.4.0-150600.23.81.1 |
| openSUSE:Leap 15.6 | kernel-64kb | 0 | 6.4.0-150600.23.81.3 |
| openSUSE:Leap 15.6 | kernel-azure | 0 | 6.4.0-150600.8.58.1 |
| openSUSE:Leap 15.6 | kernel-debug | 0 | 6.4.0-150600.23.81.3 |
| openSUSE:Leap 15.6 | kernel-default | 0 | 6.4.0-150600.23.81.3 |
| openSUSE:Leap 15.6 | kernel-default-base | 0 | 6.4.0-150600.23.81.3.150600.12.36.3 |
| openSUSE:Leap 15.6 | kernel-docs | 0 | 6.4.0-150600.23.81.1 |
| openSUSE:Leap 15.6 | kernel-kvmsmall | 0 | 6.4.0-150600.23.81.3 |
| openSUSE:Leap 15.6 | kernel-obs-build | 0 | 6.4.0-150600.23.81.3 |
| openSUSE:Leap 15.6 | kernel-obs-qa | 0 | 6.4.0-150600.23.81.1 |
| openSUSE:Leap 15.6 | kernel-rt | 0 | 6.4.0-150600.10.61.1 |
| openSUSE:Leap 15.6 | kernel-rt_debug | 0 | 6.4.0-150600.10.61.1 |
| openSUSE:Leap 15.6 | kernel-source | 0 | 6.4.0-150600.23.81.2 |
| openSUSE:Leap 15.6 | kernel-source-azure | 0 | 6.4.0-150600.8.58.1 |
| openSUSE:Leap 15.6 | kernel-source-rt | 0 | 6.4.0-150600.10.61.1 |
| openSUSE:Leap 15.6 | kernel-syms | 0 | 6.4.0-150600.23.81.1 |
| openSUSE:Leap 15.6 | kernel-syms-azure | 0 | 6.4.0-150600.8.58.1 |
| openSUSE:Leap 15.6 | kernel-syms-rt | 0 | 6.4.0-150600.10.61.1 |
| openSUSE:Leap 15.6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.81.3 |
| openSUSE:Leap 16.0 | dtb-aarch64 | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-64kb | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-default | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-default-base | 0 | 6.12.0-160000.8.1.160000.2.5 |
| openSUSE:Leap 16.0 | kernel-docs | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-kvmsmall | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-obs-build | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-obs-qa | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-rt | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-source | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-syms | 0 | 6.12.0-160000.8.1 |
| openSUSE:Leap 16.0 | kernel-zfcpdump | 0 | 6.12.0-160000.8.1 |
Related vulnerabilities
- CVE-2025-39910 In the Linux kernel, the following vulnerability has been resolved: mm/vmalloc, mm/kasan… Also affects hyperv-daemons-6.12
- CVE-2025-39925 can: j1939: implement NETDEV_UNREGISTER notification handler Also affects hyperv-daemons-6.12
- CVE-2025-39905 net: phylink: add lock for serializing concurrent pl->phydev writes with resolver Also affects hyperv-daemons-6.12
- CVE-2025-39862 In the Linux kernel, the following vulnerability has been resolved: wifi: mt76: mt7915… Also affects hyperv-daemons-6.12
- CVE-2025-39834 In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, Fix… Also affects hyperv-daemons-6.12
- CVE-2025-39830 In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, Fix… Also affects hyperv-daemons-6.12
- CVE-2025-39833 In the Linux kernel, the following vulnerability has been resolved: mISDN: hfcpci: Fix… Also affects hyperv-daemons-6.12
- CVE-2025-39822 In the Linux kernel, the following vulnerability has been resolved: io_uring/kbuf: fix… Also affects hyperv-daemons-6.12