Skip to main content

CVE-2024-26853: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-26853cvecve-2024-26853
Published: Wed Apr 17 2024 (04/17/2024, 10:17:16 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: igc: avoid returning frame twice in XDP_REDIRECT When a frame can not be transmitted in XDP_REDIRECT (e.g. due to a full queue), it is necessary to free it by calling xdp_return_frame_rx_napi. However, this is the responsibility of the caller of the ndo_xdp_xmit (see for example bq_xmit_all in kernel/bpf/devmap.c) and thus calling it inside igc_xdp_xmit (which is the ndo_xdp_xmit of the igc driver) as well will lead to memory corruption. In fact, bq_xmit_all expects that it can return all frames after the last successfully transmitted one. Therefore, break for the first not transmitted frame, but do not call xdp_return_frame_rx_napi in igc_xdp_xmit. This is equally implemented in other Intel drivers such as the igb. There are two alternatives to this that were rejected: 1. Return num_frames as all the frames would have been transmitted and release them inside igc_xdp_xmit. While it might work technically, it is not what the return value is meant to represent (i.e. the number of SUCCESSFULLY transmitted packets). 2. Rework kernel/bpf/devmap.c and all drivers to support non-consecutively dropped packets. Besides being complex, it likely has a negative performance impact without a significant gain since it is anyway unlikely that the next frame can be transmitted if the previous one was dropped. The memory corruption can be reproduced with the following script which leads to a kernel panic after a few seconds. It basically generates more traffic than a i225 NIC can transmit and pushes it via XDP_REDIRECT from a virtual interface to the physical interface where frames get dropped. #!/bin/bash INTERFACE=enp4s0 INTERFACE_IDX=`cat /sys/class/net/$INTERFACE/ifindex` sudo ip link add dev veth1 type veth peer name veth2 sudo ip link set up $INTERFACE sudo ip link set up veth1 sudo ip link set up veth2 cat << EOF > redirect.bpf.c SEC("prog") int redirect(struct xdp_md *ctx) { return bpf_redirect($INTERFACE_IDX, 0); } char _license[] SEC("license") = "GPL"; EOF clang -O2 -g -Wall -target bpf -c redirect.bpf.c -o redirect.bpf.o sudo ip link set veth2 xdp obj redirect.bpf.o cat << EOF > pass.bpf.c SEC("prog") int pass(struct xdp_md *ctx) { return XDP_PASS; } char _license[] SEC("license") = "GPL"; EOF clang -O2 -g -Wall -target bpf -c pass.bpf.c -o pass.bpf.o sudo ip link set $INTERFACE xdp obj pass.bpf.o cat << EOF > trafgen.cfg { /* Ethernet Header */ 0xe8, 0x6a, 0x64, 0x41, 0xbf, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, const16(ETH_P_IP), /* IPv4 Header */ 0b01000101, 0, # IPv4 version, IHL, TOS const16(1028), # IPv4 total length (UDP length + 20 bytes (IP header)) const16(2), # IPv4 ident 0b01000000, 0, # IPv4 flags, fragmentation off 64, # IPv4 TTL 17, # Protocol UDP csumip(14, 33), # IPv4 checksum /* UDP Header */ 10, 0, 1, 1, # IP Src - adapt as needed 10, 0, 1, 2, # IP Dest - adapt as needed const16(6666), # UDP Src Port const16(6666), # UDP Dest Port const16(1008), # UDP length (UDP header 8 bytes + payload length) csumudp(14, 34), # UDP checksum /* Payload */ fill('W', 1000), } EOF sudo trafgen -i trafgen.cfg -b3000MB -o veth1 --cpp

AI-Powered Analysis

AILast updated: 06/29/2025, 19:26:48 UTC

Technical Analysis

CVE-2024-26853 is a vulnerability in the Linux kernel's implementation of the Intel igc network driver related to the XDP_REDIRECT feature, which is part of the eXpress Data Path (XDP) framework used for high-performance packet processing. The flaw arises from improper handling of frame transmission failures in the ndo_xdp_xmit function of the igc driver. Specifically, when a frame cannot be transmitted due to conditions such as a full transmit queue, the driver incorrectly frees the frame internally by calling xdp_return_frame_rx_napi, despite this being the responsibility of the caller (e.g., bq_xmit_all in kernel/bpf/devmap.c). This double-free or premature freeing leads to memory corruption within the kernel. The vulnerability can be triggered by generating traffic that exceeds the transmission capacity of an i225 NIC, causing frames to be dropped and subsequently mishandled by the driver. This results in kernel memory corruption that can cause a kernel panic (system crash). The issue is rooted in a design decision to avoid reworking the kernel/bpf/devmap.c and all drivers to support non-consecutively dropped packets due to complexity and performance concerns. The vulnerability is reproducible using a provided script that sets up virtual Ethernet interfaces and loads custom BPF programs to redirect traffic, thereby triggering the faulty code path. The flaw affects specific versions of the Linux kernel containing the vulnerable igc driver implementation. No CVSS score has been assigned yet, and there are no known exploits in the wild at the time of publication. The vulnerability is significant because it impacts kernel stability and could be exploited to cause denial of service via kernel panic, potentially disrupting network services on affected systems.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with the affected igc driver, especially those using Intel i225 network interface cards or similar hardware. The impact includes potential denial of service through kernel panics triggered by crafted network traffic or high traffic loads, which can disrupt critical network infrastructure, servers, or cloud environments. Organizations relying on Linux-based network appliances, routers, or servers in data centers could experience outages or degraded performance. Since the vulnerability involves kernel memory corruption, it could also be leveraged as a stepping stone for privilege escalation or other advanced attacks if combined with other vulnerabilities, although no such exploits are currently known. The disruption of network services can affect business continuity, especially for sectors dependent on high availability such as finance, telecommunications, healthcare, and critical infrastructure. Additionally, the complexity of the exploit involving XDP and BPF programs suggests that attackers with advanced capabilities could weaponize this flaw in targeted attacks against European enterprises or government networks.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should: 1) Apply the latest Linux kernel patches that address CVE-2024-26853 as soon as they become available from their Linux distribution vendors or upstream kernel sources. 2) Audit and monitor network interfaces using Intel i225 or similar NICs for unusual kernel crashes or panics that could indicate exploitation attempts. 3) Restrict the ability to load or execute custom BPF/XDP programs to trusted administrators only, as the exploit requires loading crafted BPF code to trigger the flaw. 4) Implement network traffic shaping or rate limiting to prevent excessive traffic loads that might inadvertently trigger the bug. 5) Use kernel live patching solutions where possible to apply fixes without downtime. 6) Conduct thorough testing of network drivers and kernel updates in staging environments before deployment to production to avoid service disruptions. 7) Maintain comprehensive logging and alerting on kernel errors and network interface anomalies to detect early signs of exploitation or instability. 8) Consider isolating critical network functions on hardware or virtual machines that do not use the affected drivers until patches are applied.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-19T14:20:24.183Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982bc4522896dcbe3d95

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

Last enriched: 6/29/2025, 7:26:48 PM

Last updated: 8/17/2025, 11:13:34 PM

Views: 14

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