{"id":"CVE-2026-53222","summary":"ptp: ocp: fix resource freeing order","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nptp: ocp: fix resource freeing order\n\nCommit a60fc3294a37 (\"ptp: rework ptp_clock_unregister() to disable\nevents\") added a call to ptp_disable_all_events() which changes the\nconfiguration of pins if they support EXTTS events. In ptp_ocp_detach()\npins resources are freed before ptp_clock_unregister() and it leads to\nuse-after-free during driver removal. Fix it by changing the order of\nfree/unregister calls. To avoid irq handler running on the other core\nwhile ptp device unregistering, call synchronize_irq() after HW is\nconfigured to stop producing irqs and no irqs are in-flight.","modified":"2026-07-08T08:13:44.086099927Z","published":"2026-06-25T08:39:23.934Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53222.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/627366c51145a07f675b1800fb5ea2ec960bd900"},{"type":"WEB","url":"https://git.kernel.org/stable/c/aa03698bb28d3be5ee180adb185395054b342b04"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53222.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53222"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"a60fc3294a377204664b5484e4a487fa124155da"},{"fixed":"aa03698bb28d3be5ee180adb185395054b342b04"},{"fixed":"627366c51145a07f675b1800fb5ea2ec960bd900"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53222.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.18.0"},{"fixed":"7.0.13"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53222.json"}}],"schema_version":"1.7.5"}