{"id":"CVE-2026-53222","state":"PUBLISHED","title":"ptp: ocp: fix resource freeing order","description":"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.","publishedAt":"2026-06-25T08:39:23.934Z","updatedAt":"2026-10-15T10:07:43.087Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a60fc3294a377204664b5484e4a487fa124155da","status":"affected","lessThan":"daacc9d1430b63f6bee6e5646def5d6414d35c4e","versionType":"git"},{"version":"a60fc3294a377204664b5484e4a487fa124155da","status":"affected","lessThan":"aa03698bb28d3be5ee180adb185395054b342b04","versionType":"git"},{"version":"a60fc3294a377204664b5484e4a487fa124155da","status":"affected","lessThan":"627366c51145a07f675b1800fb5ea2ec960bd900","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ptp/ptp_ocp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.13","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ptp/ptp_ocp.c"]}],"references":["https://git.kernel.org/stable/c/daacc9d1430b63f6bee6e5646def5d6414d35c4e","https://git.kernel.org/stable/c/aa03698bb28d3be5ee180adb185395054b342b04","https://git.kernel.org/stable/c/627366c51145a07f675b1800fb5ea2ec960bd900"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:16.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/53xxx/CVE-2026-53222.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-53222","state":"PUBLISHED","datePublished":"2026-06-25T08:39:23.934Z","dateUpdated":"2026-10-15T10:07:43.087Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-06-09T07:44:35.392Z"},"containers":{"cna":{"title":"ptp: ocp: fix resource freeing order","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a60fc3294a377204664b5484e4a487fa124155da","status":"affected","lessThan":"daacc9d1430b63f6bee6e5646def5d6414d35c4e","versionType":"git"},{"version":"a60fc3294a377204664b5484e4a487fa124155da","status":"affected","lessThan":"aa03698bb28d3be5ee180adb185395054b342b04","versionType":"git"},{"version":"a60fc3294a377204664b5484e4a487fa124155da","status":"affected","lessThan":"627366c51145a07f675b1800fb5ea2ec960bd900","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ptp/ptp_ocp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.13","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ptp/ptp_ocp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/daacc9d1430b63f6bee6e5646def5d6414d35c4e"},{"url":"https://git.kernel.org/stable/c/aa03698bb28d3be5ee180adb185395054b342b04"},{"url":"https://git.kernel.org/stable/c/627366c51145a07f675b1800fb5ea2ec960bd900"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-15T10:07:43.087Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"6.18.57"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.0.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}