CVE-2024-35839: netfilter: bridge: replace physindev with physinif in nf_bridge_info
In the Linux kernel, the following vulnerability has been resolved:
netfilter: bridge: replace physindev with physinif in nfbridgeinfo
An skb can be added to a neigh->arpqueue while waiting for an arp reply. Where original skb's skb->dev can be different to neigh's neigh->dev. For instance in case of bridging dnated skb from one veth to another, the skb would be added to a neigh->arpqueue of the bridge.
As skb->dev can be reset back to nfbridge->physindev and used, and as there is no explicit mechanism that prevents this physindev from been freed under us (for instance neighflushdev doesn't cleanup skbs from different device's neigh queue) we can crash on e.g. this stack:
arpprocess neighupdate skb = skbdequeue(&neigh->arpqueue) neighresolveoutput(..., skb) ... brnfdevxmit brnfpreroutingfinishbridgeslow skb->dev = nfbridge->physindev brhandleframefinish
Let's use plain ifindex instead of netdevice link. To peek into the original netdevice we will use devgetbyindexrcu(). Thus either we get device and are safe to use it or we don't get it and drop skb.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
netfilter: bridge: replace physindev with physinif in nfbridgeinfo
The Linux kernel CVE team has assigned CVE-2024-35839 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024051756-CVE-2024-35839-4194@gregkh/T
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-35839?
CVE-2024-35839 has been classified as a medium severity vulnerability due to potential impacts on network performance.
How do I fix CVE-2024-35839?
To mitigate CVE-2024-35839, upgrade to kernel versions 6.1.75, 6.6.14, 6.7.2, 6.8, or any versions provided by Debian up to 5.10.226-1.
What components are affected by CVE-2024-35839?
CVE-2024-35839 affects the Linux kernel, specifically the netfilter bridge component.
Is there a workaround for CVE-2024-35839?
There are no specific workarounds documented for CVE-2024-35839, so updating the kernel is the recommended approach.
What is the impact of CVE-2024-35839?
The impact of CVE-2024-35839 can include inconsistencies in packet processing, potentially leading to network disruptions.