Bluetooth: RFCOMM: serialize security confirmation handling
- 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 5.10.270, 5.15.221, 6.1.188, 6.6.157, 6.12.109, and 2 more
- 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
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: RFCOMM: serialize security confirmation handling rfcomm_security_cfm() looks up a session on session_list and then walks its DLC list without holding rfcomm_mutex. Since RFCOMM session teardown uses rfcomm_mutex, krfcommd can close and free the same session and DLCs concurrently: hci_rx_work krfcommd ----------- --------- rfcomm_session_get() rfcomm_lock() rfcomm_session_close() rfcomm_dlc_unlink() rfcomm_session_del() kfree(s) rfcomm_unlock() walk s->dlcs The callback can then read a freed session list head and touch freed DLCs while updating their flags or timers. Serialize the session lookup and DLC traversal in rfcomm_security_cfm() with rfcomm_mutex. This matches the existing RFCOMM session lifetime rules and prevents concurrent rfcomm_session_del() / rfcomm_dlc_unlink() from tearing the objects down while the callback is using them. KASAN reported: BUG: KASAN: slab-use-after-free in rfcomm_security_cfm+0x41c/0x440 Read of size 8 at addr ffff888111fb3960 by task kworker/u17:1/89 Workqueue: hci0 hci_rx_work Call Trace: rfcomm_security_cfm+0x41c/0x440 hci_encrypt_cfm+0x139/0x590 hci_encrypt_change_evt+0x37b/0xc40 hci_event_packet+0x71b/0xb20 hci_rx_work+0x293/0x730 Allocated by task 69: rfcomm_session_add+0x9e/0x2f0 rfcomm_run+0x44b/0x41e0 Freed by task 69: kfree+0x131/0x3c0 rfcomm_session_del+0x188/0x220 rfcomm_run+0x1985/0x41e0
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 08c30aca9e698faddebd34f81e1196295f9dc063 · fixed in 62ce8b33eb238cf18c15207332fbdc26d858f592; From 08c30aca9e698faddebd34f81e1196295f9dc063 · fixed in 3873f3449701b3dc98cba577923be6493598e7a1; From 08c30aca9e698faddebd34f81e1196295f9dc063 · fixed in 7ded3264106418c6456ccceaafd9fda596ce12c3; From 08c30aca9e698faddebd34f81e1196295f9dc063 · fixed in 82425b14f0fb22e46cfddc56d6465570f5ed0ce6; From 08c30aca9e698faddebd34f81e1196295f9dc063 · fixed in 1b7841ffad08e911e8c4b9470f3fa08423568940; From 08c30aca9e698faddebd34f81e1196295f9dc063 · fixed in 946d76db77ee5f922968ce558629ae47b381e3fc; From 08c30aca9e698faddebd34f81e1196295f9dc063 · fixed in fbf7961964a6e93360179f64712320ae9a1e9577; From 08c30aca9e698faddebd34f81e1196295f9dc063 · fixed in 759c185d0bbdb131357408f50b8735e04ed3caff
- Linux Linux
3.10
- KernelLinux
From 3.10.0 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.109; From 6.13.0 · fixed in 6.18.50; From 6.19.0 · fixed in 7.2.4
References 8
git.kernel.org
- stable/c/62ce8b33eb238cf18c15207332fbdc26d858f592
- stable/c/3873f3449701b3dc98cba577923be6493598e7a1
- stable/c/7ded3264106418c6456ccceaafd9fda596ce12c3
- stable/c/82425b14f0fb22e46cfddc56d6465570f5ed0ce6
- stable/c/1b7841ffad08e911e8c4b9470f3fa08423568940
- stable/c/946d76db77ee5f922968ce558629ae47b381e3fc
- stable/c/fbf7961964a6e93360179f64712320ae9a1e9577
- stable/c/759c185d0bbdb131357408f50b8735e04ed3caff