]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
batman-adv: frag: ensure fragment is writable before modifying TTL
authorSven Eckelmann <sven@narfation.org>
Thu, 11 Jun 2026 20:14:54 +0000 (22:14 +0200)
committerSven Eckelmann <sven@narfation.org>
Sat, 13 Jun 2026 05:57:51 +0000 (07:57 +0200)
commitb7293c6e8c15b2db77809b25cf8389e35331b27a
tree5f372808639587ea669d3bb823d30c316a65bb32
parente728bbdf32660c8f32b8f5e8d09427a2c131ad60
batman-adv: frag: ensure fragment is writable before modifying TTL

Before batman-adv is allowed to write to an skb, it either has to have its
own copy of the skb or use skb_cow() to ensure that the data part is not
shared. But batadv_frag_skb_fwd() modifies the TTL even when it is shared.

Adding a skb_cow() right before this operation avoids this and can at the
same time prepare it for the modifications required to forward the
fragment.

Cc: stable@kernel.org
Fixes: 610bfc6bc99b ("batman-adv: Receive fragmented packets and merge")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/fragmentation.c
net/batman-adv/fragmentation.h
net/batman-adv/routing.c