KernelScan.io

HIGH

batman-adv OGM Overflow

CVE-2026-31683

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI8.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: batman-adv: avoid OGM aggregation when skb tailroom is insufficient When OGM aggregation state is toggled at runtime, an existing forwarded packet may have been allocated with only packet_len bytes, while a later packet can still be selected for aggregation. Appending in this case can hit skb_put overflow conditions. Reject aggregation when the target skb tailroom cannot accommodate the new packet. The caller then falls back to creating a new forward packet instead of appending.

02

Engine v0.2.0

Risk summary

Adjacent attackers can trigger a heap buffer overflow in the batman-adv mesh networking protocol by sending crafted OGM packets to a forwarding node that has an undersized aggregation buffer. This leads to controlled kernel heap memory corruption, potentially enabling code execution, privilege escalation, or system crashes on devices running batman-adv.

Affectednet/batman-adv/bat_iv_ogm.c (batman-adv mesh networking)

Vulnerability analysis

The vulnerability exists in batman-adv's OGM (Originator Message) aggregation logic. When OGM aggregation state is toggled at runtime, an existing forwarded packet may be allocated with only packet_len bytes of tailroom. If a subsequent OGM packet is selected for aggregation into this undersized skb, the append operation writes beyond the buffer boundary, causing a heap buffer overflow. The fix adds a tailroom check (skb_tailroom(forw_packet->skb) < packet_len) to reject aggregation when insufficient space exists, forcing the caller to allocate a new forward packet instead. Because batman-adv processes layer-2 mesh frames from adjacent nodes, the bug is reachable from the local network segment without requiring privileges on the target system.

03

BranchFixed inPatch commit
5.105.10.25367176c96f325
5.155.15.2030b10a8b355c3
6.16.1.1676755347c5f9b
6.126.12.786e40ebb999c2
6.186.18.200e35db29fc5a
6.196.19.10eda89a1bae06
6.66.6.1301ada20331f2d
mainline7.00d4aef630be9