{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-39859","id":"CVE-2025-39859","title":"ptp: ocp: fix use-after-free bugs causing by ptp_ocp_watchdog","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nptp: ocp: fix use-after-free bugs causing by ptp_ocp_watchdog\n\nThe ptp_ocp_detach() only shuts down the watchdog timer if it is\npending. However, if the timer handler is already running, the\ntimer_delete_sync() is not called. This leads to race conditions\nwhere the devlink that contains the ptp_ocp is deallocated while\nthe timer ","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nptp: ocp: fix use-after-free bugs causing by ptp_ocp_watchdog\n\nThe ptp_ocp_detach() only shuts down the watchdog timer if it is\npending. However, if the timer handler is already running, the\ntimer_delete_sync() is not called. This leads to race conditions\nwhere the devlink that contains the ptp_ocp is deallocated while\nthe timer handler is still accessing it, resulting in use-after-free\nbugs. The following details one of the race scenarios.\n\n(thread 1)                           | (thread 2)\nptp_ocp_remove()                     |\n  ptp_ocp_detach()                   | ptp_ocp_watchdog()\n    if (timer_pending(&bp->watchdog))|   bp = timer_container_of()\n      timer_delete_sync()            |\n                                     |\n  devlink_free(devlink) //free       |\n                                     |   bp-> //use\n\nResolve this by unconditionally calling timer_delete_sync() to ensure\nthe timer is reliably deactivated, preventing any access after free.","published":"2025-09-19T15:26:29.717Z","updated":"2026-11-01T02:30:28.911024696Z","reserved":"2025-04-16T07:20:57.143Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"CISA-ADP"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"773bda96492153e11d21eb63ac814669b51fc701","lessThan":"a59822a762039b6e0252f21b091245d6ad7f324b","status":"affected","versionType":"git"},{"version":"773bda96492153e11d21eb63ac814669b51fc701","lessThan":"e2a6eabe5304a789b7d40ce2576cd80154255e51","status":"affected","versionType":"git"},{"version":"773bda96492153e11d21eb63ac814669b51fc701","lessThan":"aad70bdfc8244616e48c434310cab241a3f17781","status":"affected","versionType":"git"},{"version":"773bda96492153e11d21eb63ac814669b51fc701","lessThan":"f10d3c7267ac7387a5129d5506c3c5f2460cfd9b","status":"affected","versionType":"git"},{"version":"773bda96492153e11d21eb63ac814669b51fc701","lessThan":"8bf935cf789872350b04c1a6468b0a509f67afb2","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","lessThan":"5.15","status":"unaffected","versionType":"semver"},{"version":"6.1.191","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.160","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.114","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.16.6","lessThanOrEqual":"6.16.*","status":"unaffected","versionType":"semver"},{"version":"6.17","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/a59822a762039b6e0252f21b091245d6ad7f324b","tags":["web"]},{"url":"https://git.kernel.org/stable/c/e2a6eabe5304a789b7d40ce2576cd80154255e51","tags":["web"]},{"url":"https://git.kernel.org/stable/c/aad70bdfc8244616e48c434310cab241a3f17781","tags":["web"]},{"url":"https://git.kernel.org/stable/c/f10d3c7267ac7387a5129d5506c3c5f2460cfd9b","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/8bf935cf789872350b04c1a6468b0a509f67afb2","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39859.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39859","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00204,"epssPercentile":0.1053,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-39859","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39859","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-39859","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-39859","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}