KernelScan.io

CRITICAL

batman-adv TT Overflow

CVE-2026-31659

CVSS 9.8 / 10.0 NVD

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

KernelScan AI8.7HIGH

01

In the Linux kernel, the following vulnerability has been resolved: batman-adv: reject oversized global TT response buffers batadv_tt_prepare_tvlv_global_data() builds the allocation length for a global TT response in 16-bit temporaries. When a remote originator advertises a large enough global TT, the TT payload length plus the VLAN header offset can exceed 65535 and wrap before kmalloc(). The full-table response path still uses the original TT payload length when it fills tt_change, so the wrapped allocation is too small and batadv_tt_prepare_tvlv_global_data() writes past the end of the heap object before the later packet-size check runs. Fix this by rejecting TT responses whose TVLV value length cannot fit in the 16-bit TVLV payload length field.

02

Engine v0.2.0

Risk summary

Adjacent attackers on batman-adv mesh networks can trigger an integer overflow in translation table processing, leading to a heap buffer overflow and potential arbitrary code execution. Any device participating in a batman-adv mesh is vulnerable to malformed packets from other mesh nodes.

Affectednet/batman-adv/translation-table.c (batman-adv mesh networking)

Vulnerability analysis

The batadv_tt_prepare_tvlv_global_data() function uses 16-bit variables to calculate allocation sizes for translation table responses. When processing oversized global TT data advertised by a remote originator, the payload length plus VLAN header offset can exceed 65535, causing integer wraparound before kmalloc(). The function then writes the full unwrapped data size into the undersized allocation, resulting in a heap buffer overflow. The fix adds bounds checking to reject TT responses that cannot fit in the 16-bit TVLV payload length field, preventing the integer overflow condition.

03

BranchFixed inPatch commit
5.105.10.2537e5d007e0df9
5.155.15.2032997f4bd1f98
6.16.1.16995c71365a222
6.126.12.82f970646b9a39
6.186.18.23de6c1dc3c7d0
6.196.19.13cf2199171ef7
6.66.6.13569d61639bc7e
mainline7.03a359bf5c61d