Privilege escalation via Bluetooth SCO use-after-free
Published Mar 3, 2022 · Updated Aug 3, 2024
Use-after-free in the Linux Kernel through 5.15.3 allows privileged local users to escalate privileges or crash the system. During an SCO send, userfaultfd can suspend memcpy_from_msg while sco_conn_del frees the shared sco_conn object, after which hci_send_sco dereferences it. Exploitation requires CAP_NET_ADMIN, a fabricated SCO connection, a controlled faulting page, and controller detachment; the demonstrated outcome is a kernel crash.
Summary
What happened
Use-after-free in the Linux Kernel through 5.15.3 allows privileged local users to escalate privileges or crash the system. During an SCO send, userfaultfd can suspend memcpy_from_msg while sco_conn_del frees the shared sco_conn object, after which hci_send_sco dereferences it. Exploitation requires CAP_NET_ADMIN, a fabricated SCO connection, a controlled faulting page, and controller detachment; the demonstrated outcome is a kernel crash.
The record
- CVE
- CVE-2021-3640
- Published
- Mar 3, 2022
- Updated
- Aug 3, 2024
- Vendor
- The Linux Kernel Organization
- Product
- Linux Kernel
- Classifications
- CWE-362, CWE-416, T1068, T1499.004
- Attack vector
- local
- Privileges
- admin
Timeline
How it unfolded
- Mar 3, 2022CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=Affects kernel v5.15.3 and prior, Fixed in v5.16-rc1 and above.
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Linux Bluetooth SCO race proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo