CVE-2025-39859

ptp: ocp: fix use-after-free bugs causing by ptp_ocp_watchdog

State
Published
Severity
7.8 High
Published
Sep 19, 2025
Updated
Oct 30, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HCISA-ADP

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 773bda96492153e11d21eb63ac814669b51fc701 to before a59822a762039b6e0252f21b091245d6ad7f324bAffected
  • 773bda96492153e11d21eb63ac814669b51fc701 to before e2a6eabe5304a789b7d40ce2576cd80154255e51Affected
  • 773bda96492153e11d21eb63ac814669b51fc701 to before aad70bdfc8244616e48c434310cab241a3f17781Affected
  • 773bda96492153e11d21eb63ac814669b51fc701 to before f10d3c7267ac7387a5129d5506c3c5f2460cfd9bAffected
  • 773bda96492153e11d21eb63ac814669b51fc701 to before 8bf935cf789872350b04c1a6468b0a509f67afb2Affected
LinuxLinux
  • 5.15Affected
  • before 5.15Not affected
  • 6.1.191 through 6.1.*Not affected
  • 6.6.160 through 6.6.*Not affected
  • 6.12.114 through 6.12.*Not affected
  • 6.16.6 through 6.16.*Not affected
  • 6.17 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.