{"id":"CVE-2024-45020","published":"2024-09-11T15:13:54Z","modified":"2026-08-05T11:37:44Z","title":"bpf: Fix a kernel verifier crash in stacksafe()","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","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.00344,"percentile":0.20312,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/7cad3174cc79519bf5f6c4441780264416822c08","tags":[]},{"url":"https://git.kernel.org/stable/c/6e3987ac310c74bb4dd6a2fa8e46702fe505fb2b","tags":[]},{"url":"https://git.kernel.org/stable/c/bed2eb964c70b780fb55925892a74f26cb590b25","tags":[]}],"priority":{"score":9.5,"factors":[{"name":"EPSS percentile","points":4.06},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= ab470fefce2837e66b771c60858118d50bb5bb10, < 7cad3174cc79519bf5f6c4441780264416822c08",">= 2793a8b015f7f1caadb9bce9c63dc659f7522676, < 6e3987ac310c74bb4dd6a2fa8e46702fe505fb2b",">= 2793a8b015f7f1caadb9bce9c63dc659f7522676, < bed2eb964c70b780fb55925892a74f26cb590b25",">= 6.6.15, < 6.6.48"]},{"vendor":"Linux","product":"Linux","versions":["6.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-29T15:48:14.999365Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-41500","exploited":false,"provenance":"source"}}