{
  "id": "CVE-2025-39859",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39859",
  "published_at": "2025-09-19T15:26:29.717Z",
  "title": "ptp: ocp: fix use-after-free bugs causing by ptp_ocp_watchdog",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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 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(\u0026bp-\u003ewatchdog))|   bp = timer_container_of()\n      timer_delete_sync()            |\n                                     |\n  devlink_free(devlink) //free       |\n                                     |   bp-\u003e //use\n\nResolve this by unconditionally calling timer_delete_sync() to ensure\nthe timer is reliably deactivated, preventing any access after free.",
  "cwe": "CWE-416",
  "cpes": [
    "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:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 7.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 773bda96492153e11d21eb63ac814669b51fc701, \u003c a59822a762039b6e0252f21b091245d6ad7f324b",
          "\u003e= 773bda96492153e11d21eb63ac814669b51fc701, \u003c e2a6eabe5304a789b7d40ce2576cd80154255e51",
          "\u003e= 773bda96492153e11d21eb63ac814669b51fc701, \u003c aad70bdfc8244616e48c434310cab241a3f17781",
          "\u003e= 773bda96492153e11d21eb63ac814669b51fc701, \u003c f10d3c7267ac7387a5129d5506c3c5f2460cfd9b",
          "\u003e= 773bda96492153e11d21eb63ac814669b51fc701, \u003c 8bf935cf789872350b04c1a6468b0a509f67afb2"
        ],
        "fixed_in": [
          "a59822a762039b6e0252f21b091245d6ad7f324b",
          "e2a6eabe5304a789b7d40ce2576cd80154255e51",
          "aad70bdfc8244616e48c434310cab241a3f17781",
          "f10d3c7267ac7387a5129d5506c3c5f2460cfd9b",
          "8bf935cf789872350b04c1a6468b0a509f67afb2"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.15"
        ],
        "fixed_in": [
          "0",
          "6.1.191",
          "6.6.160",
          "6.12.114",
          "6.16.6",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to a59822a762039b6e0252f21b091245d6ad7f324b or e2a6eabe5304a789b7d40ce2576cd80154255e51 or aad70bdfc8244616e48c434310cab241a3f17781 or f10d3c7267ac7387a5129d5506c3c5f2460cfd9b or 8bf935cf789872350b04c1a6468b0a509f67afb2 or later.",
      "Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.114 or 6.16.6 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
