CVE-2024-26803: net: veth: clear GRO when clearing XDP even when down
In the Linux kernel, the following vulnerability has been resolved:
net: veth: clear GRO when clearing XDP even when down
The Linux kernel CVE team has assigned CVE-2024-26803 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024040404-CVE-2024-26803-9985@gregkh/T
Other sources
In the Linux kernel, the following vulnerability has been resolved:
net: veth: clear GRO when clearing XDP even when down
veth sets NETIFFGRO automatically when XDP is enabled, because both features use the same NAPI machinery.
The logic to clear NETIFFGRO sits in vethdisablexdp() which is called both on ndostop and when XDP is turned off. To avoid the flag from being cleared when the device is brought down, the clearing is skipped when IFFUP is not set. Bringing the device down should indeed not modify its features.
Unfortunately, this means that clearing is also skipped when XDP is disabled while the device is down. And there's nothing on the open path to bring the device features back into sync. IOW if user enables XDP, disables it and then brings the device up we'll end up with a stray GRO flag set but no NAPI instances.
We don't depend on the GRO flag on the datapath, so the datapath won't crash. We will crash (or hang), however, next time features are sync'ed (either by user via ethtool or peer changing its config). The GRO flag will go away, and veth will try to disable the NAPIs. But the open path never created them since XDP was off, the GRO flag was a stray. If NAPI was initialized before we'll hang in napidisable(). If it never was we'll crash trying to stop uninitialized hrtimer.
Move the GRO flag updates to the XDP enable / disable paths, instead of mixing them with the ndoopen / ndoclose paths.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.15.151 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.1.81 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.6.21 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.7.9 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.8 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch CVE-2024-26803
Event History
Frequently Asked Questions
What is the severity of CVE-2024-26803?
CVE-2024-26803 is classified as a moderate severity vulnerability.
How do I fix CVE-2024-26803?
To fix CVE-2024-26803, upgrade to kernel version 5.15.151, 6.1.81, 6.6.21, 6.7.9, 6.8, or relevant patched versions available for your distribution.
What software is affected by CVE-2024-26803?
CVE-2024-26803 affects specific versions of the Linux kernel in Red Hat and Debian distributions.
What does CVE-2024-26803 exploit?
CVE-2024-26803 exploits a vulnerability in the kernel networking stack impacting the veth driver.
Is CVE-2024-26803 present in earlier kernel versions?
Yes, CVE-2024-26803 is present in earlier kernel versions before the specified remedial updates.