CVE-2024-49987
MediumIn 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 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-476CVE-2024-49987 is a NULL Pointer Dereference vulnerability
What is NULL Pointer Dereference?
The product dereferences a pointer that it expects to be valid but is NULL, typically causing a crash. Learn more on MITRE CWE
Affected versions
Linux kernel versions
6.4
and later are affected. Fixed in
6.6.55,
6.10.14,
6.11.3,
6.12
and their respective stable series.
References
The following references provide additional information about CVE-2024-49987 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/2e0f6f33f2aa87493b365a38a8fd87b8854b7734
-
PatchKernel patch commithttps://git.kernel.org/stable/c/c208b02827eb642758cef65641995fd3f38c89af
-
PatchKernel patch commithttps://git.kernel.org/stable/c/c2d9f9a7837ab29ccae0c42252f17d436bf0a501
Frequently asked questions
-
What is CVE-2024-49987?
CVE-2024-49987 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as a NULL Pointer Dereference flaw (CWE-476) . It affects Linux kernel versions from 6.4 onward and has been patched in 6.6.55, 6.10.14, 6.11.3 and others. CVE-2024-49987 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2024-49987?
CVE-2024-49987 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2024-49987?
Yes — CVE-2024-49987 has been patched. Fixed versions include 6.6.55, 6.10.14, 6.11.3 and others. If you are running Linux kernel 6.4 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2024-49987 actively exploited?
No — CVE-2024-49987 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is NULL Pointer Dereference (CWE-476)?
The product dereferences a pointer that it expects to be valid but is NULL, typically causing a crash. View CWE-476 on MITRE CWE →