CVE-2026-80839: batman-adv: reject unrepresentable multicast TVLV offsets
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: reject unrepresentable multicast TVLV offsets
The network and transport header fields in struct skbuff are 16-bit offsets from skb->head, and U16MAX is reserved as the unset transport header value. batadvtvlvcallhandler() sets both fields from a received multicast TVLV without checking whether the TVLV end is representable.
If the end offset exceeds the field's range, skbsettransportheader() truncates it so that the transport header precedes the network header. The negative difference is then returned by skbnetworkheaderlen() as a large u32. batadvmcastforwpacket() consequently accepts an oversized multicast tracker and accesses memory beyond the skb data.
Add skbsettransportheadercareful(), an offset-aware counterpart to skbresettransportheadercareful(), which validates the final head-relative offset before assigning it. Use the new helper in batadvtvlvcallhandler() and reject unrepresentable TVLVs before setting the network header.
Affected Software
Event History
Frequently Asked Questions
What must an attacker be able to send to trigger this issue?
An attacker must be able to provide a malformed multicast TVLV to the affected batman-adv handling path. The TVLV must have an end offset that cannot be represented by the 16-bit skb network and transport header offset fields.
What is the impact of a successful trigger?
The malformed offset can cause the transport header to precede the network header after truncation. This produces a large calculated network-header length, allowing batadv_mcast_forw_packet() to accept an oversized multicast tracker and access memory beyond the skb data.
How is the issue fixed?
The fix validates the final head-relative transport-header offset before assigning it. Multicast TVLVs with unrepresentable offsets are rejected instead of being processed.