CVE-2024-39482

Source
https://cve.org/CVERecord?id=CVE-2024-39482
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-39482.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-39482
Downstream
Related
Published
2024-07-05T06:55:10.599Z
Modified
2026-03-14T12:34:44.888973Z
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/tree/main/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
Fixed
5a1922adc5798b7ec894cd3f197afb6f9591b023
Fixed
934e1e4331859183a861f396d7dfaf33cb5afb02
Fixed
6479b9f41583b013041943c4602e1ad61cec8148
Fixed
0c31344e22dd8d6b1394c6e4c41d639015bdc671
Fixed
3a861560ccb35f2a4f0a4b8207fa7c2a35fc7f31

Database specific

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