CVE-2025-39859

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
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:*:*:*:*:*:*

History

30 Oct 2026, 13:18

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/a59822a762039b6e0252f21b091245d6ad7f324b -

21 Oct 2026, 13:18

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/aad70bdfc8244616e48c434310cab241a3f17781 -
  • () https://git.kernel.org/stable/c/e2a6eabe5304a789b7d40ce2576cd80154255e51 -

19 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ptp: ocp: corregir errores de uso después de liberación causados por ptp_ocp_watchdog La 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. (hilo 1) | (hilo 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) //liberar | | bp-> //uso Esto 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.

Information

Published : 2025-09-19 16:15

Updated : 2026-10-30 13:18


NVD link : CVE-2025-39859

Mitre link : CVE-2025-39859

CVE.ORG link : CVE-2025-39859


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-416

Use After Free