{"id":"CVE-2024-39482","published":"2024-07-05T06:55:10Z","modified":"2026-10-15T00:44:17Z","title":"bcache: fix variable length array abuse in btree_iter","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbcache: fix variable length array abuse in btree_iter\n\nbtree_iter is used in two ways: either allocated on the stack with a\nfixed size MAX_BSETS, or from a mempool with a dynamic size based on the\nspecific cache set. Previously, the struct had a fixed-length array of\nsize MAX_BSETS which was indexed out-of-bounds for the dynamically-sized\niterators, which causes UBSAN to complain.\n\nThis patch uses the same approach as in bcachefs's sort_iter and splits\nthe iterator into a btree_iter with a flexible array member and a\nbtree_iter_stack which embeds a btree_iter as well as a fixed-length\ndata array.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00238,"percentile":0.15192,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/2c3d7b03b658dc8bfa6112b194b67b92a87e081b","tags":[]},{"url":"https://git.kernel.org/stable/c/5a1922adc5798b7ec894cd3f197afb6f9591b023","tags":[]},{"url":"https://git.kernel.org/stable/c/934e1e4331859183a861f396d7dfaf33cb5afb02","tags":[]},{"url":"https://git.kernel.org/stable/c/6479b9f41583b013041943c4602e1ad61cec8148","tags":[]},{"url":"https://git.kernel.org/stable/c/0c31344e22dd8d6b1394c6e4c41d639015bdc671","tags":[]},{"url":"https://git.kernel.org/stable/c/3a861560ccb35f2a4f0a4b8207fa7c2a35fc7f31","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-613116.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-355557.html","tags":[]}],"priority":{"score":8.5,"factors":[{"name":"EPSS percentile","points":3.04},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 2c3d7b03b658dc8bfa6112b194b67b92a87e081b",">= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 5a1922adc5798b7ec894cd3f197afb6f9591b023",">= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 934e1e4331859183a861f396d7dfaf33cb5afb02",">= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 6479b9f41583b013041943c4602e1ad61cec8148",">= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 0c31344e22dd8d6b1394c6e4c41d639015bdc671",">= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 3a861560ccb35f2a4f0a4b8207fa7c2a35fc7f31"]},{"vendor":"Linux","product":"Linux","versions":["3.10"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-07-08T17:54:07.988323Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-38007","exploited":false,"provenance":"source"}}