# CVE-2024-39482: bcache: fix variable length array abuse in btree\_iter

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-07-05 · Modified: 2026-10-15
- Aliases: UBUNTU-CVE-2024-39482, DEBIAN-CVE-2024-39482
- Record: https://cvemate.com/vulnerability/CVE-2024-39482 · JSON: https://cvemate.com/vulnerability/CVE-2024-39482/json

## Description

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

bcache: fix variable length array abuse in btree_iter

btree_iter is used in two ways: either allocated on the stack with a
fixed size MAX_BSETS, or from a mempool with a dynamic size based on the
specific cache set. Previously, the struct had a fixed-length array of
size MAX_BSETS which was indexed out-of-bounds for the dynamically-sized
iterators, which causes UBSAN to complain.

This patch uses the same approach as in bcachefs's sort_iter and splits
the iterator into a btree_iter with a flexible array member and a
btree_iter_stack which embeds a btree_iter as well as a fixed-length
data array.
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.238%, percentile 15.92%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 95)

- debian linux (Debian): \< 6.1.94-1 \| \< 6.9.7-1
- ubuntu linux (Ubuntu): \< 6.8.0-40.40
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 6.8.0-1013.14
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1013.14~22.04.1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1012.14
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.2 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 26)

- <https://git.kernel.org/stable/c/2c3d7b03b658dc8bfa6112b194b67b92a87e081b>
- <https://git.kernel.org/stable/c/5a1922adc5798b7ec894cd3f197afb6f9591b023>
- <https://git.kernel.org/stable/c/934e1e4331859183a861f396d7dfaf33cb5afb02>
- <https://git.kernel.org/stable/c/6479b9f41583b013041943c4602e1ad61cec8148>
- <https://git.kernel.org/stable/c/0c31344e22dd8d6b1394c6e4c41d639015bdc671>
- <https://git.kernel.org/stable/c/3a861560ccb35f2a4f0a4b8207fa7c2a35fc7f31>
- <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-613116.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-355557.html>
- <https://ubuntu.com/security/CVE-2024-39482>
- <https://www.cve.org/CVERecord?id=CVE-2024-39482>
- <https://git.kernel.org/linus/3a861560ccb35f2a4f0a4b8207fa7c2a35fc7f31>
- <https://ubuntu.com/security/notices/USN-6949-1>
- <https://ubuntu.com/security/notices/USN-6952-1>
- <https://ubuntu.com/security/notices/USN-6955-1>
- <https://ubuntu.com/security/notices/USN-6949-2>
- <https://ubuntu.com/security/notices/USN-6952-2>
- <https://ubuntu.com/security/notices/USN-7007-1>
- <https://ubuntu.com/security/notices/USN-7009-1>
- <https://ubuntu.com/security/notices/USN-7019-1>

---

Data as of 2026-12-05T04:10:50.214Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
