CVE-2026-31683: batman-adv: avoid OGM aggregation when skb tailroom is insufficient
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-31683 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.38 with commit c6c8fea29769d998d94fcec9b9f14d4b52b349d3 and fixed in 5.10.253 with commit 67176c96f325837b0bb3e9538ca2eba414f447d8 Issue introduced in 2.6.38 with commit c6c8fea29769d998d94fcec9b9f14d4b52b349d3 and fixed in 5.15.203 with commit 0b10a8b355c3f71012ce89289ec2c2f5e3bfd6c1 Issue introduced in 2.6.38 with commit c6c8fea29769d998d94fcec9b9f14d4b52b349d3 and fixed in 6.1.167 with commit 6755347c5f9bdd44dee80f692208b056fcd40a52 Issue introduced in 2.6.38 with commit c6c8fea29769d998d94fcec9b9f14d4b52b349d3 and fixed in 6.6.130 with commit 1ada20331f2df2a942d6b83ae1f04a304b642e2a Issue introduced in 2.6.38 with commit c6c8fea29769d998d94fcec9b9f14d4b52b349d3 and fixed in 6.12.78 with commit 6e40ebb999c2c3d2fbb3cacb61f0384ee6e69075 Issue introduced in 2.6.38 with commit c6c8fea29769d998d94fcec9b9f14d4b52b349d3 and fixed in 6.18.20 with commit 0e35db29fc5a97a8553f7c2d3a2ba730e46b1ee8 Issue introduced in 2.6.38 with commit c6c8fea29769d998d94fcec9b9f14d4b52b349d3 and fixed in 6.19.10 with commit eda89a1bae0602aec8314ced299bb243b9f9aeef Issue introduced in 2.6.38 with commit c6c8fea29769d998d94fcec9b9f14d4b52b349d3 and fixed in 7.0 with commit 0d4aef630be9d5f9c1227d07669c26c4383b5ad0
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-31683
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/batman-adv/bat_iv_ogm.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/67176c96f325837b0bb3e9538ca2eba414f447d8 https://git.kernel.org/stable/c/0b10a8b355c3f71012ce89289ec2c2f5e3bfd6c1 https://git.kernel.org/stable/c/6755347c5f9bdd44dee80f692208b056fcd40a52 https://git.kernel.org/stable/c/1ada20331f2df2a942d6b83ae1f04a304b642e2a https://git.kernel.org/stable/c/6e40ebb999c2c3d2fbb3cacb61f0384ee6e69075 https://git.kernel.org/stable/c/0e35db29fc5a97a8553f7c2d3a2ba730e46b1ee8 https://git.kernel.org/stable/c/eda89a1bae0602aec8314ced299bb243b9f9aeef https://git.kernel.org/stable/c/0d4aef630be9d5f9c1227d07669c26c4383b5ad0