Skip to main content

Linux Kernel CVE-2024-27050

HIGH
Out-of-bounds Write (CWE-787)
2024-05-01 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.8
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local low-privilege access
  2. Delivery
    Trigger execution of older-ABI libbpf binary
  3. Exploit
    Call bpf_xdp_query() with undersized opts struct
  4. Execution
    Unpatched libbpf writes fields beyond struct boundary
  5. Persist
    Corrupt adjacent stack memory in calling process
  6. Impact
    Hijack control flow for privilege escalation

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a specific ABI mismatch: a program binary compiled against an older version of libbpf (where bpf_xdp_query_opts does not include the feature_flags or xdp_zc_max_segs fields) must call bpf_xdp_query() at runtime against a newer, unpatched libbpf that unconditionally writes those fields. This condition is not present in standard same-version deployments where the program and libbpf are compiled together or against matching headers. The CVSS vector (AV:L/PR:L) confirms local, authenticated access is required; remote exploitation is not possible. Additionally, the triggering code path is limited to programs that explicitly invoke bpf_xdp_query() with an opts struct - deployments that do not use XDP querying via libbpf are entirely unaffected. The ABI mismatch condition is most likely to arise during kernel or libbpf upgrades in environments where pre-built binaries are not simultaneously recompiled.

Impact

The CVSS 7.8 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) reflects a worst-case scenario: a local low-privileged user triggers stack corruption in a privileged process, potentially escalating to full control. However, real-world risk is substantially lower than the raw score implies. EPSS of 0.27% (19th percentile) signals minimal observed exploitation interest. The vulnerability is absent from CISA KEV, and no public exploit or POC has been identified at time of analysis. Critically, exploitation requires a specific ABI mismatch - a program compiled against an older libbpf must call bpf_xdp_query() against a newer runtime that lacks the OPTS_SET() fix. This condition arises most plausibly during kernel or libbpf upgrades where binaries are not recompiled, rather than through deliberate attacker configuration. The NVD's AC:L rating may overstate ease; the ABI mismatch precondition is a non-trivial environmental requirement. Overall, this is primarily a stability and reliability concern for environments undergoing libbpf version transitions, not an active exploitation priority.

Exploit ScenarioDerived

A local attacker with low privileges executes, or induces execution of, an XDP-management program compiled against an older libbpf where bpf_xdp_query_opts lacks the feature_flags or xdp_zc_max_segs fields. When this binary calls bpf_xdp_query() against a newer, unpatched libbpf runtime, libbpf unconditionally writes those fields beyond the caller's struct boundary, corrupting adjacent stack data. If the victim process runs with elevated privileges - for example, a network management daemon - the stack corruption could overwrite a return address or function pointer, enabling privilege escalation; no public POC has been identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Aug 04, 2026

Stack corruption in Linux kernel libbpf's bpf_xdp_query() function can corrupt adjacent stack memory in programs that call this API with an older libbpf ABI. The root cause is the absence of the OPTS_SET() macro when writing feature_flags and xdp_zc_max_segs to bpf_xdp_query_opts, causing unconditional out-of-bounds writes into callers compiled against a smaller version of the struct. No public exploit has been identified and EPSS sits at 0.27%, but the CVSS 7.8 High rating reflects the potential for full privilege escalation via stack corruption in a local context.

Earlier versions of this analysis (2)
v2 Aug 04, 2026 - 13:00 cvss changed CVSS 7.8

Stack corruption in the Linux kernel's libbpf bpf_xdp_query() function can allow local low-privileged attackers to corrupt stack memory in programs that call this function, potentially enabling privilege escalation. The flaw stems from two new fields (feature_flags and xdp_zc_max_segs) being written to the bpf_xdp_query_opts struct unconditionally - without the OPTS_SET() ABI guard macro - so programs compiled against older libbpf headers have their stack corrupted when the newer libbpf writes beyond the allocated struct boundary. No public exploit has been identified at time of analysis, and the EPSS score of 0.27% (19th percentile) reflects the low real-world exploitation probability despite the 7.8 CVSS score.

v1 Aug 04, 2026 - 13:00 cvss changed CVSS 7.8

Stack corruption in the Linux kernel's libbpf bpf_xdp_query() function allows a local low-privileged attacker to trigger out-of-bounds memory writes, potentially leading to privilege escalation. The flaw stems from missing OPTS_SET() macro guards when writing the feature_flags and xdp_zc_max_segs fields to the bpf_xdp_query_opts struct - programs compiled against an older libbpf (with a smaller struct layout) will have stack memory written beyond their struct boundary. No public exploit code or active exploitation has been identified at time of analysis; EPSS is notably low at 0.27% (19th percentile).

RemediationAI

Apply the upstream kernel patches from the four stable-branch commits available at https://git.kernel.org/stable/c/682ddd62abd4bdcee7584246903e7a2df005fe0d, https://git.kernel.org/stable/c/92a871ab9fa59a74d013bc04f321026a057618e7, https://git.kernel.org/stable/c/cd3be9843247edb8fc6fcd8d8237cbce2bc19f5e, and https://git.kernel.org/stable/c/fa5bef5e80c6a3321b2b1a7070436f3bc5daf07c. Distribution vendors (Red Hat, Ubuntu, Debian, SUSE) will typically backport these into their stable kernel packages; applying the latest kernel update from your distribution is the recommended path. Note: the exact patched kernel release version number is not independently confirmed from available data - verify with your distribution's security advisory. As a compensating control in environments that cannot immediately update, ensure all programs invoking bpf_xdp_query() are recompiled and relinked against the same libbpf version present at runtime; this eliminates the ABI size mismatch that triggers the out-of-bounds write, though it does not fix the underlying library defect. Restricting execution of XDP-querying programs to trusted users via capability controls (CAP_NET_ADMIN or CAP_SYS_ADMIN as appropriate) reduces exposure surface but does not remediate the vulnerability.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in libbpf, the userspace BPF (Berkeley Packet Filter) library shipped with the Linux kernel, specifically in the bpf_xdp_query() function used to query XDP (eXpress Data Path) interface settings. When the feature_flags and xdp_zc_max_segs fields were introduced to the bpf_xdp_query_opts struct, the implementation wrote to them without using the OPTS_SET() macro. OPTS_SET() internally relies on OPTS_HAS() to verify that the caller's struct size includes the target field before writing - a critical backward-compatibility guard for libbpf's versioned opts pattern. Skipping this guard causes libbpf to write beyond the caller's struct boundary, corrupting whatever lies adjacent on the stack. CWE-787 (Out-of-Bounds Write) precisely classifies the root cause. Affected products span the Linux kernel across multiple stable branches per CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.0 HIGH

ABI mismatch between binary and runtime is a non-default environmental precondition justifying AC:H; local low-privilege access confirmed by description and CVSS vector.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

6
Analysis Updated
Aug 04, 2026 - 13:02 vuln.today
v3 - CVSS changed
Analysis Updated
Aug 04, 2026 - 13:00 vuln.today
v2 - CVSS changed
Analysis Updated
Aug 04, 2026 - 13:00 vuln.today
v1 - CVSS changed
Severity Changed
Aug 04, 2026 - 11:23 NVD
MEDIUM HIGH
CVSS changed
Aug 04, 2026 - 11:23 NVD
5.5 (MEDIUM) 7.8 (HIGH)
CVE Published
May 01, 2024 - 13:15 cve.org
MEDIUM 5.5

DescriptionCVE.org

In the Linux kernel, the following vulnerability has been resolved:

libbpf: Use OPTS_SET() macro in bpf_xdp_query()

When the feature_flags and xdp_zc_max_segs fields were added to the libbpf bpf_xdp_query_opts, the code writing them did not use the OPTS_SET() macro. This causes libbpf to write to those fields unconditionally, which means that programs compiled against an older version of libbpf (with a smaller size of the bpf_xdp_query_opts struct) will have its stack corrupted by libbpf writing out of bounds.

The patch adding the feature_flags field has an early bail out if the feature_flags field is not part of the opts struct (via the OPTS_HAS) macro, but the patch adding xdp_zc_max_segs does not. For consistency, this fix just changes the assignments to both fields to use the OPTS_SET() macro.

Executive ViewAI

Why It Matters

CVE-2024-27050 introduces a memory corruption vulnerability in Linux kernel libbpf that enables local privilege escalation, affecting any organization running systems or containers with vulnerable versions. Threat actors gaining local system access could exploit stack corruption to achieve root-level system compromise, creating significant risk for development systems, CI/CD infrastructure, and cloud workloads.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Ubiquitous
Linux kernel underlies the vast majority of server, cloud, and embedded deployments.
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Medium

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Affected Products (CPE)CVE.org

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy