HIGH Introduced in 3.13
batman-adv MergedFragment UAF
CVE-2026-89951
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.5HIGH
01Description
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 skb_iif. batadv_batman_skb_recv() 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 net_device 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.
02KernelScan AI Analysis
Risk summary
An attacker on the same batman-adv mesh network can send fragmented packets timed with hard interface teardown to trigger a use-after-free of a network device structure. This can lead to kernel memory corruption, information disclosure, or a kernel panic on the target node. Any device running batman-adv with reachable mesh peers is at risk.
Vulnerability analysis
During fragment reassembly, batman-adv reuses the socket buffer from the highest-numbered buffered fragment as the merged packet. If the hard interface that originally received that fragment is deleted before the reassembly chain completes, the merged packet retains a stale pointer to the now-freed network device. When the merged packet re-enters the normal receive path, handlers that derive ARP header length from the packet's device pointer dereference the freed structure, causing a use-after-free. The fix refreshes the packet's device metadata from the current receive device before any handler runs, ensuring reinjected merged fragments always reference a valid interface. An attacker on the same mesh network can trigger this by sending fragmented batman-adv packets timed to coincide with interface teardown on the target node; no privileges on the target system are required, but the race window between fragment arrival and interface removal makes reliable exploitation difficult.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.2 | 3.13 | 7.2.5 | 2dffc8c44b6e |
| 5.10 | 3.13 | 5.10.270 | 63d86250fa7c |
| 6.6 | 3.13 | 6.6.157 | 6df64825f8b1 |
| 6.12 | 3.13 | 6.12.110 | a2c272da99c2 |
| mainline | 3.13 | 7.3-rc1 | ad46c907d7d9 |
| 5.15 | 3.13 | 5.15.221 | f830c2dfc143 |
| 6.18 | 3.13 | 6.18.51 | e91d2cc7441d |
| 6.1 | 3.13 | 6.1.188 | f4b4ae763b5d |
| cip/6.12 | 3.13 | 6.12.111-cip32 | a2c272da99c2 |