CVE-2024-39482

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-39482
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-39482.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-39482
Downstream
Related
Published
2024-07-05T06:55:10.599Z
Modified
2025-11-27T02:33:05.354120Z
Summary
bcache: fix variable length array abuse in btree_iter
Details

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

bcache: fix variable length array abuse in btree_iter

btreeiter is used in two ways: either allocated on the stack with a fixed size MAXBSETS, 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 sortiter and splits the iterator into a btreeiter with a flexible array member and a btreeiterstack which embeds a btree_iter as well as a fixed-length data array.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/blob/cc431b3424123d84bcd7afd4de150b33f117a8ef/cves/2024/39xxx/CVE-2024-39482.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
cafe563591446cf80bfbc2fe3bc72a2e36cf1060
Fixed
2c3d7b03b658dc8bfa6112b194b67b92a87e081b
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cafe563591446cf80bfbc2fe3bc72a2e36cf1060
Fixed
5a1922adc5798b7ec894cd3f197afb6f9591b023
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cafe563591446cf80bfbc2fe3bc72a2e36cf1060
Fixed
934e1e4331859183a861f396d7dfaf33cb5afb02
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cafe563591446cf80bfbc2fe3bc72a2e36cf1060
Fixed
6479b9f41583b013041943c4602e1ad61cec8148
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cafe563591446cf80bfbc2fe3bc72a2e36cf1060
Fixed
0c31344e22dd8d6b1394c6e4c41d639015bdc671
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cafe563591446cf80bfbc2fe3bc72a2e36cf1060
Fixed
3a861560ccb35f2a4f0a4b8207fa7c2a35fc7f31

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.10.0
Fixed
5.10.221
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.162
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.94
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.34
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.9.5