CVE-2024-26853: igc: avoid returning frame twice in XDP_REDIRECT

Published Apr 17, 2024
·
Updated

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

igc: avoid returning frame twice in XDPREDIRECT

The Linux kernel CVE team has assigned CVE-2024-26853 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024041723-CVE-2024-26853-b549@gregkh/T

Other sources

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

igc: avoid returning frame twice in XDPREDIRECT

When a frame can not be transmitted in XDPREDIRECT (e.g. due to a full queue), it is necessary to free it by calling xdpreturnframerxnapi.

However, this is the responsibility of the caller of the ndoxdpxmit (see for example bqxmitall in kernel/bpf/devmap.c) and thus calling it inside igcxdpxmit (which is the ndoxdpxmit of the igc driver) as well will lead to memory corruption.

In fact, bqxmitall 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 xdpreturnframerxnapi in igcxdpxmit. This is equally implemented in other Intel drivers such as the igb.

There are two alternatives to this that were rejected: 1. Return numframes as all the frames would have been transmitted and release them inside igcxdpxmit. 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 XDPREDIRECT from a virtual interface to the physical interface where frames get dropped.

#!/bin/bash INTERFACE=enp4s0 INTERFACEIDX=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 xdpmd ctx) { return bpfredirect($INTERFACEIDX, 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 xdpmd ctx) { return XDPPASS; }

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(ETHPIP),

/ 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

NVD

Affected Software

17 affected componentsFixes available
redhat/kernel<6.1.82
6.1.82
redhat/kernel<6.6.22
6.6.22
redhat/kernel<6.7.10
6.7.10
redhat/kernel<6.8
6.8
Linux Linux kernel>=5.13<6.1.82
Linux Linux kernel>=6.2<6.6.22
Linux Linux kernel>=6.7<6.7.10
Linux Linux kernel=6.8-rc1
Linux Linux kernel=6.8-rc2
Linux Linux kernel=6.8-rc3
Linux Linux kernel=6.8-rc4
Linux Linux kernel=6.8-rc5
Linux Linux kernel=6.8-rc6
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2

Event History

Apr 17, 2024
CVE Published
via MITRE·10:17 AM
Data Sourced
via MITRE·10:17 AM
Description
Data Sourced
via Red Hat·07:30 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-26853?

CVE-2024-26853 has been classified as a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-26853?

To remediate CVE-2024-26853, update the Linux kernel package to versions 6.1.82, 6.6.22, 6.7.10, or 6.8 or later.

3

What systems are affected by CVE-2024-26853?

The vulnerable Linux kernel versions are 6.1.82, 6.6.22, 6.7.10, and 6.8 or earlier.

4

Is CVE-2024-26853 related to network security?

Yes, CVE-2024-26853 involves the XDP_REDIRECT feature, which is related to network packet processing.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203