First published: Wed Sep 11 2024(Updated: )
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.
Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Software | Affected Version | How to fix |
---|---|---|
Linux Kernel | >=6.6.15<6.6.48 | |
Linux Kernel | >=6.7<6.10.7 | |
Linux Kernel | =6.11-rc1 | |
Linux Kernel | =6.11-rc2 | |
Linux Kernel | =6.11-rc3 | |
debian/linux | 5.10.223-1 5.10.234-1 6.1.129-1 6.1.135-1 6.12.22-1 6.12.25-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2024-45020 has been classified as a moderate severity vulnerability due to its potential to cause a kernel verifier crash.
To fix CVE-2024-45020, update the Linux kernel to a version that is not affected by this vulnerability, such as versions 5.10.223-1, 5.10.226-1, or 6.12.11-1.
CVE-2024-45020 affects Linux Kernel versions between 6.6.15 and 6.6.48, as well as versions between 6.7 and 6.10.7.
CVE-2024-45020 was reported by Daniel Hodges following a kernel verifier crash.
The vulnerability involves a kernel verifier crash related to invalid memory access in the stacksafe() function.