CVE-2025-39859
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
19/09/2025
Last modified:
12/12/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ptp: ocp: fix use-after-free bugs causing by ptp_ocp_watchdog<br />
<br />
The ptp_ocp_detach() only shuts down the watchdog timer if it is<br />
pending. However, if the timer handler is already running, the<br />
timer_delete_sync() is not called. This leads to race conditions<br />
where the devlink that contains the ptp_ocp is deallocated while<br />
the timer handler is still accessing it, resulting in use-after-free<br />
bugs. The following details one of the race scenarios.<br />
<br />
(thread 1) | (thread 2)<br />
ptp_ocp_remove() |<br />
ptp_ocp_detach() | ptp_ocp_watchdog()<br />
if (timer_pending(&bp->watchdog))| bp = timer_container_of()<br />
timer_delete_sync() |<br />
|<br />
devlink_free(devlink) //free |<br />
| bp-> //use<br />
<br />
Resolve this by unconditionally calling timer_delete_sync() to ensure<br />
the timer is reliably deactivated, preventing any access after free.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15 (including) | 6.16.6 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



