CVE-2024-41062

Source
https://cve.org/CVERecord?id=CVE-2024-41062
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-41062.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-41062
Downstream
Related
Published
2024-07-29T14:57:24.352Z
Modified
2026-03-14T12:35:06.025494Z
Summary
bluetooth/l2cap: sync sock recv cb and release
Details

In the Linux kernel, the following vulnerability has been resolved:

bluetooth/l2cap: sync sock recv cb and release

The problem occurs between the system call to close the sock and hcirxwork, where the former releases the sock and the latter accesses it without lock protection.

       CPU0                       CPU1
       ----                       ----
       sock_close                 hci_rx_work
   l2cap_sock_release         hci_acldata_packet
   l2cap_sock_kill            l2cap_recv_frame
   sk_free                    l2cap_conless_channel
                              l2cap_sock_recv_cb

If hcirxwork processes the data that needs to be received before the sock is closed, then everything is normal; Otherwise, the work thread may access the released sock when receiving data.

Add a chan mutex in the rx callback of the sock to achieve synchronization between the sock release and recv cb.

Sock is dead, so set chan data to NULL, avoid others use invalid sock pointer.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/41xxx/CVE-2024-41062.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5b4cedaa14bd1fe3ca1d59c684203a6ae7747faa
Fixed
605572e64cd9cebb05ed609d96cff05b50d18cdf
Fixed
b803f30ea23e0968b6c8285c42adf0d862ab2bf6
Fixed
3b732449b78183d17178db40be3a4401cf3cd629
Fixed
89e856e124f9ae548572c56b1b70c2255705f8fe

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-41062.json"