CWE
787
Advisory Published
Updated

CVE-2024-45020: bpf: Fix a kernel verifier crash in stacksafe()

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 SoftwareAffected VersionHow 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

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2024-45020?

    CVE-2024-45020 has been classified as a moderate severity vulnerability due to its potential to cause a kernel verifier crash.

  • How do I fix CVE-2024-45020?

    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.

  • Which versions of the Linux Kernel are affected by CVE-2024-45020?

    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.

  • Who reported CVE-2024-45020?

    CVE-2024-45020 was reported by Daniel Hodges following a kernel verifier crash.

  • What components are involved in the CVE-2024-45020 vulnerability?

    The vulnerability involves a kernel verifier crash related to invalid memory access in the stacksafe() function.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203