{"id":"CVE-2024-45020","aliases":["CVE-2024-45020"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Fix a kernel verifier crash in stacksafe()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix a kernel verifier crash in stacksafe()\n\nDaniel Hodges reported a kernel verifier crash when playing with sched-ext.\nFurther investigation shows that the crash is due to invalid memory access\nin stacksafe(). More specifically, it is the following code:\n\n    if (exact != NOT_EXACT &&\n        old->stack[spi].slot_type[i % BPF_REG_SIZE] !=\n        cur->stack[spi].slot_type[i % BPF_REG_SIZE])\n            return false;\n\nThe 'i' iterates old->allocated_stack.\nIf cur->allocated_stack < old->allocated_stack the out-of-bound\naccess will happen.\n\nTo fix the issue add 'i >= cur->allocated_stack' check such that if\nthe condition is true, stacksafe() should fail. Otherwise,\ncur->stack[spi].slot_type[i % BPF_REG_SIZE] memory access is legal.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix a kernel verifier crash in stacksafe()\n\nDaniel Hodges reported a kernel verifier crash when playing with sched-ext.\nFurther investigation shows that the crash is due to invalid memory access\nin stacksafe(). More specifically, it is the following code:\n\n    if (exact != NOT_EXACT &&\n        old->stack[spi].slot_type[i % BPF_REG_SIZE] !=\n        cur->stack[spi].slot_type[i % BPF_REG_SIZE])\n            return false;\n\nThe 'i' iterates old->allocated_stack.\nIf cur->allocated_stack < old->allocated_stack the out-of-bound\naccess will happen.\n\nTo fix the issue add 'i >= cur->allocated_stack' check such that if\nthe condition is true, stacksafe() should fail. Otherwise,\ncur->stack[spi].slot_type[i % BPF_REG_SIZE] memory access is legal.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf: Se corrige un fallo del verificador del kernel en stacksafe() Daniel Hodges informó de un fallo del verificador del kernel al jugar con sched-ext. Una investigación más profunda muestra que el fallo se debe a un acceso a memoria no válido en stacksafe(). Más específicamente, es el siguiente código: if (exact != NOT_EXACT &amp;&amp; old-&gt;stack[spi].slot_type[i % BPF_REG_SIZE] != cur-&gt;stack[spi].slot_type[i % BPF_REG_SIZE]) return false; La 'i' itera old-&gt;allocated_stack. Si cur-&gt;allocated_stack &lt; old-&gt;allocated_stack, se producirá el acceso fuera de límites. Para solucionar el problema, agregue la comprobación 'i &gt;= cur-&gt;allocated_stack' de modo que, si la condición es verdadera, stacksafe() debería fallar. De lo contrario, el acceso a la memoria cur-&gt;stack[spi].slot_type[i % BPF_REG_SIZE] es legal.","source":"nvd"}],"published":"2024-09-11T15:13:54.591Z","modified":"2026-08-05T11:37:44.844Z","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-787"],"affected":[{"ranges":[{"type":"git","introduced":"ab470fefce2837e66b771c60858118d50bb5bb10","fixed":"7cad3174cc79519bf5f6c4441780264416822c08","status":"affected"},{"type":"git","introduced":"2793a8b015f7f1caadb9bce9c63dc659f7522676","fixed":"6e3987ac310c74bb4dd6a2fa8e46702fe505fb2b","status":"affected"},{"type":"git","introduced":"2793a8b015f7f1caadb9bce9c63dc659f7522676","fixed":"bed2eb964c70b780fb55925892a74f26cb590b25","status":"affected"},{"type":"semver","introduced":"6.6.15","fixed":"6.6.48","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.7","status":"unaffected"},{"type":"semver","introduced":"6.6.48","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.10.7","lastAffected":"6.10.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.11","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":"6.6.15","fixed":"6.6.48"},{"status":"affected","introduced":"6.7","fixed":"6.10.7"},{"status":"affected","version":"6.11"},{"status":"affected","version":"6.11"},{"status":"affected","version":"6.11"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/7cad3174cc79519bf5f6c4441780264416822c08","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6e3987ac310c74bb4dd6a2fa8e46702fe505fb2b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bed2eb964c70b780fb55925892a74f26cb590b25","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-29T15:48:14.999Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-45020","url":"https://www.cve.org/CVERecord?id=CVE-2024-45020","licence":"CVE Terms of Use","modified":"2026-08-05T11:37:44.844Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-45020","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-45020","licence":"Public domain","modified":"2026-08-04T11:20:11.413Z"}],"updatedAt":"2026-11-25T22:58:45.311Z","epss":{"score":0.0023,"percentile":0.14795,"date":"2026-12-01T12:00:22.000Z"}}