]> git.ipfire.org Git - thirdparty/linux.git/commit
batman-adv: dat: acquire ARP hw source only after skb realloc
authorSven Eckelmann <sven@narfation.org>
Sun, 28 Jun 2026 06:45:41 +0000 (08:45 +0200)
committerSven Eckelmann <sven@narfation.org>
Sun, 28 Jun 2026 07:58:29 +0000 (09:58 +0200)
commit48067b2ae4504500a7093d9e1e16b42e70330480
tree2836acb5da2e44aec92478d3c69b16c870621abe
parent77880a3be88d378d60cc1e8f8ec70430e2ed0518
batman-adv: dat: acquire ARP hw source only after skb realloc

The pskb_may_pull() called by batadv_get_vid() could reallocate the buffer
behind the skb. Variables which were pointing to the old buffer need to be
reassigned to avoid an use-after-free.

Cc: stable@vger.kernel.org
Fixes: b61ec31c8575 ("batman-adv: Snoop DHCPACKs for DAT")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/distributed-arp-table.c