Skip to main content

CVE-2024-50163: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-50163cvecve-2024-50163
Published: Thu Nov 07 2024 (11/07/2024, 09:31:40 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Make sure internal and UAPI bpf_redirect flags don't overlap The bpf_redirect_info is shared between the SKB and XDP redirect paths, and the two paths use the same numeric flag values in the ri->flags field (specifically, BPF_F_BROADCAST == BPF_F_NEXTHOP). This means that if skb bpf_redirect_neigh() is used with a non-NULL params argument and, subsequently, an XDP redirect is performed using the same bpf_redirect_info struct, the XDP path will get confused and end up crashing, which syzbot managed to trigger. With the stack-allocated bpf_redirect_info, the structure is no longer shared between the SKB and XDP paths, so the crash doesn't happen anymore. However, different code paths using identically-numbered flag values in the same struct field still seems like a bit of a mess, so this patch cleans that up by moving the flag definitions together and redefining the three flags in BPF_F_REDIRECT_INTERNAL to not overlap with the flags used for XDP. It also adds a BUILD_BUG_ON() check to make sure the overlap is not re-introduced by mistake.

AI-Powered Analysis

AILast updated: 06/28/2025, 17:57:19 UTC

Technical Analysis

CVE-2024-50163 is a vulnerability identified in the Linux kernel's Berkeley Packet Filter (BPF) subsystem, specifically related to the handling of redirect flags within the bpf_redirect_info structure. The vulnerability arises because the same numeric flag values are used in the ri->flags field for both SKB (socket buffer) and XDP (Express Data Path) redirect paths. Specifically, the flags BPF_F_BROADCAST and BPF_F_NEXTHOP share the same numeric value, leading to ambiguity when the same bpf_redirect_info structure is used across both paths. This overlap can cause the XDP redirect path to misinterpret the flags, resulting in a kernel crash. The issue was detected by syzbot, an automated kernel fuzzer, which triggered the crash by invoking skb bpf_redirect_neigh() with a non-NULL params argument followed by an XDP redirect using the same structure. The fix involves allocating bpf_redirect_info on the stack to avoid sharing between SKB and XDP paths, thereby preventing the crash. Additionally, the patch redefines the internal redirect flags to ensure they do not overlap with XDP flags and introduces a compile-time check (BUILD_BUG_ON()) to prevent future overlaps. This vulnerability is a logic flaw in kernel flag management rather than a memory corruption or privilege escalation bug. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability primarily poses a risk to systems running vulnerable versions of the Linux kernel that utilize BPF for packet processing, which is common in modern networking, container orchestration platforms (like Kubernetes), and cloud-native environments. A kernel crash caused by this flaw can lead to denial of service (DoS) conditions, potentially disrupting critical network services, data center operations, or cloud workloads. While it does not directly enable privilege escalation or data leakage, the resulting instability can impact availability and operational continuity. Organizations relying on Linux-based network appliances, firewalls, or load balancers that leverage BPF/XDP for high-performance packet processing are particularly at risk. Given the widespread use of Linux in European enterprises, telecom infrastructure, and public sector IT, the vulnerability could affect a broad range of sectors. However, exploitation requires specific conditions and crafted network traffic, limiting the ease of attack. The absence of known exploits reduces immediate risk but does not eliminate the need for prompt remediation.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2024-50163 as soon as they become available from their Linux distribution vendors. Since the vulnerability is rooted in kernel-level flag management, applying official kernel updates is the most effective mitigation. For environments where immediate patching is not feasible, organizations should consider isolating or limiting exposure of systems that perform BPF/XDP-based packet processing to untrusted networks. Monitoring kernel logs for unusual crashes or OOPS messages related to BPF redirect operations can help detect exploitation attempts. Network administrators should review and restrict use of custom BPF programs that perform redirect operations, especially those involving skb bpf_redirect_neigh() with parameters that could trigger the flaw. Additionally, organizations should engage with their Linux distribution vendors to obtain timely patches and verify that their kernel versions are not vulnerable. Implementing robust kernel crash recovery and failover mechanisms can mitigate operational impact if a crash occurs.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-10-21T19:36:19.961Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9825c4522896dcbe015d

Added to database: 5/21/2025, 9:08:53 AM

Last enriched: 6/28/2025, 5:57:19 PM

Last updated: 7/27/2025, 4:46:31 AM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats