batman-adv: frag: disallow unicast fragment in fragment
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 610bfc6bc99bc83680d190ebc69359a05fc7f605 · < 5895ad21c7059a652da83fb817510f7a1e962abf| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: frag: disallow unicast fragment in fragment
batadv_frag_skb_buffer() is called by batadv_batman_skb_recv() when a BATADV_UNICAST_FRAG packet is received. Once all fragments are collected and the packet is reassembled, batadv_recv_frag_packet() calls batadv_batman_skb_recv() again to process the defragmented payload.
A malicious sender can craft a BATADV_UNICAST_FRAG packet whose reassembled payload is itself a BATADV_UNICAST_FRAG packet (matryoshka-style nesting). Each nesting level recurses through batadv_batman_skb_recv() without bound, growing the kernel stack until it is exhausted.
Since refragmentation or fragments in fragments are not actually allowed, discard all packets which are still BATADV_UNICAST_FRAG packets after the defragmentation process.
From the CVE record · Linux
The Linux kernel's batman-adv fragment handling can recursively process a reassembled packet that is itself a unicast fragment. A malicious sender can craft nested fragments that exhaust the kernel stack. The input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with batman-adv should check their exposure; affected versions are not specified.