CVE-2026-89951: batman-adv: fix stale receive device on merged fragments
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: fix stale receive device on merged fragments
Fragment reassembly reuses the skb from the highest-numbered buffered fragment as the merged packet. When that fragment was received on a hard interface which is deleted before the chain completes, the merged skb can re-enter the receive path with a stale skb->dev and skbiif.
batadvbatmanskbrecv() passes such merged packets through the normal receive handlers again. DAT and bridge loop avoidance both derive the ARP header length from skb->dev, so they can dereference the freed netdevice before the packet reaches the local mesh interface.
Refresh the receive device metadata from the current receive device before running the packet handlers. This keeps internally reinjected merged fragments consistent with the normal receive path after hard interface teardown.
Event History
Frequently Asked Questions
What conditions are required to trigger the issue?
A fragmented packet must be undergoing batman-adv reassembly, and the highest-numbered buffered fragment must have arrived through a hard interface that is deleted before fragment reassembly completes. The merged packet must then be reinjected through the normal receive handlers.
Which packet-processing paths can access the freed device?
The DAT and bridge loop-avoidance receive paths are affected because both derive ARP header length from skb->dev. If the merged packet retains metadata for the deleted hard interface, those handlers can dereference the freed net_device.
What does the fix change?
The fix refreshes the merged packet's receive-device metadata from the current receive device before normal packet handlers run. This prevents internally reinjected merged fragments from retaining a stale skb->dev or skb_iif after hard-interface teardown.