mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
batman-adv: bla: reacquire gw address after skb realloc
commitcdf3b5af2bupstream. The pskb_may_pull() called by batadv_bla_is_backbone_gw() 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:9e794b6bf4("batman-adv: drop unicast packets from other backbone gw") Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3404be97b9
commit
ab2bac47a0
@@ -1035,6 +1035,7 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
|
||||
hdr_size);
|
||||
batadv_orig_node_put(orig_node_gw);
|
||||
if (is_gw) {
|
||||
orig_addr_gw = eth_hdr(skb)->h_source;
|
||||
batadv_dbg(BATADV_DBG_BLA, bat_priv,
|
||||
"%s(): Dropped unicast pkt received from another backbone gw %pM.\n",
|
||||
__func__, orig_addr_gw);
|
||||
|
||||
Reference in New Issue
Block a user