Vulnerability · Published May 23, 2024 · Assigned by Linux
CVE-2024-36013Bluetooth: L2CAP: Fix slab-use-after-free in l2cap_connect()
High 8.8
In plain English
A high-severity use-after-free in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 42% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: L2CAP: Fix slab-use-after-free in l2cap_connect() Extend a critical section to prevent chan from early freeing. Also make the l2cap_connect() return type void. Nothing is using the returned value but it is ugly to return a potentially freed pointer. Making it void will help with backports because earlier kernels did use the return value. Now the compile will break for kernels where this patch is not a complete fix. Call stack summary: [use] l2cap_bredr_sig_cmd l2cap_connect ┌ mutex_lock(&conn->chan_lock); │ chan = pchan->ops->new_connection(pchan); <- alloc chan │ __l2cap_chan_add(conn, chan); │ l2cap_chan_hold(chan); │ list_add(&chan->list, &conn->chan_l); ... (1) └ mutex_unlock(&conn->chan_lock); chan->conf_state ... (4) <- use after free [free] l2cap_conn_del ┌ mutex_lock(&conn->chan_lock); │ foreach chan in conn->chan_l: ... (2) │ l2cap_chan_put(chan); │ l2cap_chan_destroy │ kfree(chan) ... (3) <- chan freed └ mutex_unlock(&conn->chan_lock); ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: slab-use-after-free in l2cap_connect+0xa67/0x11a0 net/bluetooth/l2cap_core.c:4260 Read of size 8 at addr ffff88810bf040a0 by task kworker/u3:1/311
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.180-1 | DEBIAN-CVE-2024-36013 |
| Debian:13 | linux | 6.8.11-1 | DEBIAN-CVE-2024-36013 |
| Debian:14 | linux | 6.8.11-1 | DEBIAN-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux | 6.8.0-40.40 | USN-6949-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-40.40 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1013.14 | USN-6949-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1013.14 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1012.14 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1012.14~22.04.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1012.13 | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1012.13 | USN-6949-1 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1012.13~22.04.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1008.11 | USN-6949-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1008.11 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-40.40~22.04.3 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1010.10 | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1010.10 | USN-6949-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-40.40.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-40.40.1 | USN-6949-2 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-40.40.1~22.04.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1011.11 | USN-6949-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1011.11 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1011.11~22.04.1 | USN-6949-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1011.11~22.04.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1011.11.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1010.10 | USN-6955-1 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1010.10 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1010.10 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1009.10 | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1009.10 | USN-6949-2 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-40.40.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-40.40.1~22.04.1 | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-36013 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2024-36013 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 73ffa904b78287f6acf8797e040150aa26a4af4a – before 8629a65a48890769c47ebc9b6e57c02a80a8975e73ffa904b78287f6acf8797e040150aa26a4af4a – before cfe560c7050bfb37b0d2491bbe7cd8b59e77fdc573ffa904b78287f6acf8797e040150aa26a4af4a – before 826af9d2f69567c646ff46d10393d47e30ad23c673ffa904b78287f6acf8797e040150aa26a4af4a – before 4d7b41c0e43995b0e992b9f8903109275744b658 |
| Linux | Linux | 3.0 |
Weakness: CWE-416 · Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/8629a65a48890769c47ebc9b6e57c02a80a8975e
- https://git.kernel.org/stable/c/cfe560c7050bfb37b0d2491bbe7cd8b59e77fdc5
- https://git.kernel.org/stable/c/826af9d2f69567c646ff46d10393d47e30ad23c6
- https://git.kernel.org/stable/c/4d7b41c0e43995b0e992b9f8903109275744b658
- http://www.openwall.com/lists/oss-security/2024/05/30/2 x_transferred
- http://www.openwall.com/lists/oss-security/2024/05/30/1 x_transferred