diff options
| author | Kyle Zeng <kylebot@openai.com> | 2026-10-29 21:21:46 -0700 |
|---|---|---|
| committer | Sven Eckelmann <sven@narfation.org> | 2026-10-30 10:11:07 +0100 |
| commit | ea01fff30f631e67ee5f0a2b97855d772b3a35fc (patch) | |
| tree | e56c74db9f6501a0d83d5dd06a9a4051b81aa8e5 /scripts/const_structs.checkpatch | |
| parent | f91f64a91682c07e6c5f059804e709656364e8a6 (diff) | |
batman-adv: mcast: validate tracker padding before forwarding
A multicast tracker with an even number of destinations needs two
padding bytes after its destination list. batadv_mcast_forw_packet()
currently only checks that the count field and the addresses fit in
the tracker TVLV.
If an unpadded even tracker is compacted to an odd number of
destinations, batadv_mcast_forw_shrink_update_headers() includes those
missing padding bytes in the amount to remove. The subsequent memmove
can then write two bytes past the old packet tail. With no tailroom,
this corrupts skb_shared_info.
Include the required padding in the existing tracker length check.
This rejects the malformed tracker before either received or locally
generated packets can reach the compactor.
Fixes: 2dfe644a1ce0 ("batman-adv: mcast: shrink tracker packet after scrubbing")
Cc: stable@vger.kernel.org
Signed-off-by: Kyle Zeng <kylebot@openai.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions
