Home
last modified time | relevance | path

Searched hist:"260916 dfb48c374f7840f3b86e69afd3afdb6e96" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/
H A Dmacvlan.cdiff 260916dfb48c374f7840f3b86e69afd3afdb6e96 Tue May 31 22:43:00 CDT 2016 Herbert Xu <herbert@gondor.apana.org.au> macvlan: Fix potential use-after free for broadcasts

When we postpone a broadcast packet we save the source port in
the skb if it is local. However, the source port can disappear
before we get a chance to process the packet.

This patch fixes this by holding a ref count on the netdev.

It also delays the skb->cb modification until after we allocate
the new skb as you should not modify shared skbs.

Fixes: 412ca1550cbe ("macvlan: Move broadcasts into a work queue")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>