# CVE-2026-53222: ptp: ocp: fix resource freeing order

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.12%, higher than 1% of CVEs (2026-12-01)
- Published: 2026-06-25T08:39:23.934Z
- Modified: 2026-10-15T11:17:36.737Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

ptp: ocp: fix resource freeing order

Commit a60fc3294a37 ("ptp: rework ptp_clock_unregister() to disable
events") added a call to ptp_disable_all_events() which changes the
configuration of pins if they support EXTTS events. In ptp_ocp_detach()
pins resources are freed before ptp_clock_unregister() and it leads to
use-after-free during driver removal. Fix it by changing the order of
free/unregister calls. To avoid irq handler running on the other core
while ptp device unregistering, call synchronize_irq() after HW is
configured to stop producing irqs and no irqs are in-flight.

(As written by CVE List.)

## Affected

- Linux Linux: from a60fc3294a377204664b5484e4a487fa124155da before daacc9d1430b63f6bee6e5646def5d6414d35c4e; from a60fc3294a377204664b5484e4a487fa124155da before aa03698bb28d3be5ee180adb185395054b342b04; from a60fc3294a377204664b5484e4a487fa124155da before 627366c51145a07f675b1800fb5ea2ec960bd900; 6.18 (not affected: before 6.18; from 6.18.57 up to 6.18.*; from 7.0.13 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.18 before 7.0.13; 7.1

## References

- <https://git.kernel.org/stable/c/daacc9d1430b63f6bee6e5646def5d6414d35c4e>
- <https://git.kernel.org/stable/c/aa03698bb28d3be5ee180adb185395054b342b04> (patch)
- <https://git.kernel.org/stable/c/627366c51145a07f675b1800fb5ea2ec960bd900> (patch)

## Sources

- CVE List: [CVE-2026-53222](https://www.cve.org/CVERecord?id=CVE-2026-53222), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2026-53222](https://nvd.nist.gov/vuln/detail/CVE-2026-53222), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2026-53222 · Whole record: https://cve.day/CVE-2026-53222.json · Rebuilt by cve.day 2026-11-25T22:59:26.320Z
