CVE-2024-39482
bcache: fix variable length array abuse in btree_iter
Reported by linux · Published July 5, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-libbpf-static | Amazon Linux | 6.1.94-99.176.amzn2023 |
| kernel | Amazon Linux | 6.1.94-99.176.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | cafe563591446cf80bfbc2fe3bc72a2e36cf1060, cafe563591446cf80bfbc2fe3bc72a2e36cf1060, cafe563591446cf80bfbc2fe3bc72a2e36cf1060 |
| Linux | Linux | 3.10, 0, 5.10.221 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel | 0 |
| linux | linux_kernel | 3.10, 3.10, 3.10 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| Linux | Linux | *, *, * |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | python3-perf | 0 |
| Siemens | SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family | 0 |
| Siemens | RUGGEDCOM RST2428P | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel-livepatch-6.1.94-99.176 | 0 |
…and 2 more
Timeline
- Jul 4, 2024 CVE Published
- Jul 5, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (7 in total, the first dated here)
- Jan 8, 2026 Security Advisory (81 in total, the first dated here)
- Feb 16, 2026 CVE Updated
- Mar 30, 2026 Distribution Patch (78 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-39482
vulnetix vdb fixes CVE-2024-39482
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-39482/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart