kprobes: Protect kprobe_blacklist with RCU
- 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.1.188, 6.6.157, 6.12.110, 6.18.51, 7.2.5
- 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: kprobes: Protect kprobe_blacklist with RCU __within_kprobe_blacklist() traverses kprobe_blacklist without holding kprobe_mutex. When a module is unloaded, kprobe_remove_area_blacklist() removes blacklist entries and immediately frees them with kfree(). A concurrent call to within_kprobe_blacklist() can therefore dereference freed memory. Furthermore, within_kprobe_blacklist() can be called in atomic or non-preemptible contexts where the sleeping kprobe_mutex cannot be taken. Protect kprobe_blacklist with RCU. Use guard(rcu)() and list_for_each_entry_rcu() for traversal, list_add_tail_rcu() for insertions, list_del_rcu() for deletions, and kfree_rcu() to reclaim entries safely after a grace period.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 376e242429bf8539ef39a080ac113c8799840b13 · fixed in 8f406205003f741225f620f0e357ca0de71d45e3; From 376e242429bf8539ef39a080ac113c8799840b13 · fixed in 630ed8734a02b992e8a97538179c2ece42c5210f; From 376e242429bf8539ef39a080ac113c8799840b13 · fixed in 518d9b5568bb06f86e4434f7a30faa9612ea91ad; From 376e242429bf8539ef39a080ac113c8799840b13 · fixed in 5da247e4d1e8661d4d6f997101d59967e8994e32; From 376e242429bf8539ef39a080ac113c8799840b13 · fixed in 6e62cf983a2bd547e6bbd3f935539233e5f97f8f; From 376e242429bf8539ef39a080ac113c8799840b13 · fixed in 0c4256196b3a105307e2235fbfd85e768bbcdd0f
- Linux Linux
3.16
- KernelLinux
From 3.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.51; From 6.19.0 · fixed in 7.2.5