{"id":"CVE-2025-39859","aliases":["CVE-2025-39859"],"related":[],"kind":"vulnerability","state":"published","title":"ptp: ocp: fix use-after-free bugs causing by ptp_ocp_watchdog","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nptp: ocp: corregir errores de uso después de liberación causados por ptp_ocp_watchdog\n\nLa función ptp_ocp_detach() solo detiene el temporizador watchdog si está pendiente. Sin embargo, si el gestor del temporizador ya está en ejecución, la función timer_delete_sync() no es llamada. Esto lleva a condiciones de carrera donde el devlink que contiene el ptp_ocp es desasignado mientras el gestor del temporizador todavía lo está accediendo, lo que resulta en errores de uso después de liberación. A continuación se detalla uno de los escenarios de carrera.\n\n(hilo 1)                           | (hilo 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) //liberar       |\n                                     |   bp-> //uso\n\nEsto se resuelve llamando incondicionalmente a timer_delete_sync() para asegurar que el temporizador sea desactivado de forma fiable, evitando cualquier acceso después de la liberación.","source":"nvd"}],"published":"2025-09-19T15:26:29.717Z","modified":"2026-10-30T13:18:10.767Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"773bda96492153e11d21eb63ac814669b51fc701","fixed":"a59822a762039b6e0252f21b091245d6ad7f324b","status":"affected"},{"type":"git","introduced":"773bda96492153e11d21eb63ac814669b51fc701","fixed":"e2a6eabe5304a789b7d40ce2576cd80154255e51","status":"affected"},{"type":"git","introduced":"773bda96492153e11d21eb63ac814669b51fc701","fixed":"aad70bdfc8244616e48c434310cab241a3f17781","status":"affected"},{"type":"git","introduced":"773bda96492153e11d21eb63ac814669b51fc701","fixed":"f10d3c7267ac7387a5129d5506c3c5f2460cfd9b","status":"affected"},{"type":"git","introduced":"773bda96492153e11d21eb63ac814669b51fc701","fixed":"8bf935cf789872350b04c1a6468b0a509f67afb2","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.114","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.16.6","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.15","fixed":"6.16.6"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a59822a762039b6e0252f21b091245d6ad7f324b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e2a6eabe5304a789b7d40ce2576cd80154255e51","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/aad70bdfc8244616e48c434310cab241a3f17781","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f10d3c7267ac7387a5129d5506c3c5f2460cfd9b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8bf935cf789872350b04c1a6468b0a509f67afb2","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-14T19:22:59.022Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39859","url":"https://www.cve.org/CVERecord?id=CVE-2025-39859","licence":"CVE Terms of Use","modified":"2026-10-30T12:22:34.215Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39859","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39859","licence":"Public domain","modified":"2026-10-30T13:18:10.767Z"}],"updatedAt":"2026-11-25T22:59:04.870Z","epss":{"score":0.00204,"percentile":0.11009,"date":"2026-12-01T12:00:22.000Z"}}