CVE-2024-49987: bpftool: Fix undefined behavior in qsort(NULL, 0, ...)
Vulnerability summary
CVE-2024-49987 is a medium (CVSS 5.5) NULL Pointer Dereference vulnerability in linux. EPSS estimates a 0.24% chance of exploitation in the next 30 days, higher than 14.4% of scored vulnerabilities.
Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 25 · Related 25Timeline
- 21-10-2024PublishedVulnerability first disclosed.
- 11-05-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.24%
Chance of exploitation in the next 30 days
Percentile
14%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.24% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu103 products
- linux< 6.8.0-54.56
- linux-allwinner-5.19All versions (No fix recorded)
- linux-aws< 6.8.0-1023.25
- linux-aws-5.0All versions (No fix recorded)
- linux-aws-5.11All versions (No fix recorded)
Linux2 products
- linux≥ d0fe92fb5e3df6991c640fb9205d880b68603259, < c2d9f9a7837ab29ccae0c42252f17d436bf0a501 | ≥ d0fe92fb5e3df6991c640fb9205d880b68603259, < 2e0f6f33f2aa87493b365a38a8fd87b8854b7734 | ≥ d0fe92fb5e3df6991c640fb9205d880b68603259, < c208b02827eb642758cef65641995fd3f38c89af | ≥ d0fe92fb5e3df6991c640fb9205d880b68603259, < f04e2ad394e2755d0bb2d858ecb5598718bf00d5 | 6.4
- linux_kernel< 6.6.55 | ≥ 6.7, < 6.10.14 | ≥ 6.11, < 6.11.3
Debian1 product
- linux< 6.11.4-1
Opensuse1 product
- bpftool&distro=openSUSE Leap 15.6< 6.4.0-150600.19.6.1
Suse1 product
- bpftool&distro=SUSE Linux Enterprise Module for Basesystem 15 SP6< 6.4.0-150600.19.6.1
5 vendors · 108 products