{"id":"CVE-2024-39482","aliases":["CVE-2024-39482"],"related":[],"kind":"vulnerability","state":"published","title":"bcache: fix variable length array abuse in btree_iter","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bcache: corrige el abuso de matriz de longitud variable en btree_iter btree_iter se usa de dos maneras: ya sea asignado en la pila con un tamaño fijo MAX_BSETS, o desde un mempool con un tamaño dinámico basado en el conjunto de caché específico. Anteriormente, la estructura tenía una matriz de longitud fija de tamaño MAX_BSETS que estaba indexada fuera de los límites para los iteradores de tamaño dinámico, lo que provoca que UBSAN se queje. Este parche utiliza el mismo enfoque que en sort_iter de bcachefs y divide el iterador en un btree_iter con un miembro de matriz flexible y un btree_iter_stack que incorpora un btree_iter así como una matriz de datos de longitud fija.","source":"nvd"}],"published":"2024-07-05T06:55:10.599Z","modified":"2026-10-15T01:18:33.800Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"type":"git","introduced":"cafe563591446cf80bfbc2fe3bc72a2e36cf1060","fixed":"2c3d7b03b658dc8bfa6112b194b67b92a87e081b","status":"affected"},{"type":"git","introduced":"cafe563591446cf80bfbc2fe3bc72a2e36cf1060","fixed":"5a1922adc5798b7ec894cd3f197afb6f9591b023","status":"affected"},{"type":"git","introduced":"cafe563591446cf80bfbc2fe3bc72a2e36cf1060","fixed":"934e1e4331859183a861f396d7dfaf33cb5afb02","status":"affected"},{"type":"git","introduced":"cafe563591446cf80bfbc2fe3bc72a2e36cf1060","fixed":"6479b9f41583b013041943c4602e1ad61cec8148","status":"affected"},{"type":"git","introduced":"cafe563591446cf80bfbc2fe3bc72a2e36cf1060","fixed":"0c31344e22dd8d6b1394c6e4c41d639015bdc671","status":"affected"},{"type":"git","introduced":"cafe563591446cf80bfbc2fe3bc72a2e36cf1060","fixed":"3a861560ccb35f2a4f0a4b8207fa7c2a35fc7f31","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.10","status":"unaffected"},{"type":"semver","introduced":"5.10.221","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.162","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.94","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.34","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.9.5","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.10","fixed":"5.10.221"},{"status":"affected","introduced":"5.15","fixed":"5.15.162"},{"status":"affected","introduced":"6.1","fixed":"6.1.94"},{"status":"affected","introduced":"6.6","fixed":"6.6.34"},{"status":"affected","introduced":"6.9","fixed":"6.9.5"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/2c3d7b03b658dc8bfa6112b194b67b92a87e081b","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5a1922adc5798b7ec894cd3f197afb6f9591b023","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/934e1e4331859183a861f396d7dfaf33cb5afb02","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6479b9f41583b013041943c4602e1ad61cec8148","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0c31344e22dd8d6b1394c6e4c41d639015bdc671","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3a861560ccb35f2a4f0a4b8207fa7c2a35fc7f31","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-613116.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-355557.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-08T17:54:07.988Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39482","url":"https://www.cve.org/CVERecord?id=CVE-2024-39482","licence":"CVE Terms of Use","modified":"2026-10-15T00:44:17.063Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39482","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39482","licence":"Public domain","modified":"2026-10-15T01:18:33.800Z"}],"updatedAt":"2026-11-25T22:58:42.520Z","epss":{"score":0.00238,"percentile":0.15956,"date":"2026-12-01T12:00:22.000Z"}}