CVE-2024-45020 Details
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix a kernel verifier crash in stacksafe() Daniel Hodges reported a kernel verifier crash when playing with sched-ext. Further investigation shows that the crash is due to invalid memory access in stacksafe(). More specifically, it is the following code: if (exact != NOT_EXACT && old->stack[spi].slot_type[i % BPF_REG_SIZE] != cur->stack[spi].slot_type[i % BPF_REG_SIZE]) return false; The 'i' iterates old->allocated_stack. If cur->allocated_stack < old->allocated_stack the out-of-bound access will happen. To fix the issue add 'i >= cur->allocated_stack' check such that if the condition is true, stacksafe() should fail. Otherwise, cur->stack[spi].slot_type[i % BPF_REG_SIZE] memory access is legal.
A vulnerability in the Linux kernel's BPF (Berkeley Packet Filter) verifier has been identified, which can lead to a kernel crash. This issue arises from invalid memory access in the 'stacksafe()' function of the BPF verifier. The problem occurs when the verifier compares stack slot types between two states, and the iteration index exceeds the allocated stack size of the current state, causing an out-of-bounds access. The vulnerability has been addressed by adding a check to ensure the index does not exceed the allocated stack size, thereby preventing the invalid memory access.
Users can upgrade to the latest version of the Linux kernel where this vulnerability has been fixed. The specific commit addressing this issue is available in the Linux kernel stable tree.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Sep 29, 2024References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/6e3987ac310c74bb4dd6a2fa8e46702fe505fb2b | kernel.org | Patch |
| https://git.kernel.org/stable/c/7cad3174cc79519bf5f6c4441780264416822c08 | kernel.org | Patch |
| https://git.kernel.org/stable/c/bed2eb964c70b780fb55925892a74f26cb590b25 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-787 | Out-of-bounds Write | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.6.15, < 6.6.48 >= 6.7, < 6.10.7 6.11 rc1 6.11 rc2 6.11 rc3 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 4, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Sep 13, 2024 | Initial Analysis | [email protected] |
| Sep 11, 2024 | New CVE Received | kernel.org |