CVE-2024-49987
Last modified
CVE-2024-49987 is a medium-severity vulnerability rated 5.5/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: bpftool: Fix undefined behavior in qsort(NULL, 0, ...) When netfilter has no entry to display, qsort is called with qsort(NULL, 0, ...). This results in undefined behavior, as UBSan reports: net.c:827:2: runtime error: null pointer passed as argument 1, which is declared to never be null Although the C standard does not explicitly state whether calling qsort with a NULL pointer when the size is 0 constitutes undefined behavior, Section 7.1.4 of the C standard (Use of library functions) mentions: "Each of the following statements applies unless explicitly stated otherwise in the detailed descriptions that follow: If an argument to a function has an invalid value (such as a value outside the domain of the function, or a pointer outside the address space of the program, or a null pointer, or a pointer to non-modifiable storage when the corresponding parameter is not const-qualified) or a type (after promotion) not expected by a function with variable number of arguments, the behavior is undefined." To avoid this, add an early return when nf_link_info is NULL to prevent calling qsort with a NULL pointer.. EPSS estimates a 0.23% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: bpftool: Fix undefined behavior in qsort(NULL, 0, ...) When netfilter has no entry to display, qsort is called with qsort(NULL, 0, ...). This results in undefined behavior, as UBSan reports: net.c:827:2: runtime error: null pointer passed as argument 1, which is declared to never be null Although the C standard does not explicitly state whether calling qsort with a NULL pointer when the size is 0 constitutes undefined behavior, Section 7.1.4 of the C standard (Use of library functions) mentions: "Each of the following statements applies unless explicitly stated otherwise in the detailed descriptions that follow: If an argument to a function has an invalid value (such as a value outside the domain of the function, or a pointer outside the address space of the program, or a null pointer, or a pointer to non-modifiable storage when the corresponding parameter is not const-qualified) or a type (after promotion) not expected by a function with variable number of arguments, the behavior is undefined." To avoid this, add an early return when nf_link_info is NULL to prevent calling qsort with a NULL pointer.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | < 6.6.55 |
| Linux | Linux Kernel | >= 6.7, < 6.10.14 |
| Linux | Linux Kernel | >= 6.11, < 6.11.3 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2024-49987?
How severe is CVE-2024-49987?
How do I fix CVE-2024-49987?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2024
- CVE-2024-49981In the Linux kernel, the following vulnerability has been re…7
- CVE-2024-49982In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-49983In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-49984In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-49985In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-49986In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-49988In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-49989In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-4999A vulnerability in the web-based management interface of mul…9.4
- CVE-2024-49990In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-49991In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-49992In the Linux kernel, the following vulnerability has been re…7.8
Are you affected by CVE-2024-49987?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
