ptp: ocp: fix resource freeing order
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.18.57, 7.0.13
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
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.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From a60fc3294a377204664b5484e4a487fa124155da · fixed in daacc9d1430b63f6bee6e5646def5d6414d35c4e; From a60fc3294a377204664b5484e4a487fa124155da · fixed in aa03698bb28d3be5ee180adb185395054b342b04; From a60fc3294a377204664b5484e4a487fa124155da · fixed in 627366c51145a07f675b1800fb5ea2ec960bd900
- Linux Linux
6.18
- KernelLinux
From 6.18.0 · fixed in 6.18.57; From 6.19.0 · fixed in 7.0.13