diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-06-01 11:43:00 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-10 10:26:36 +0200 |
| commit | 26f2a93b7c688eb7dc1d1c8ae4cf64f451d62fbd (patch) | |
| tree | 8373390c9950d40ffbb1b70efcc14e4d95c18f5a /scripts/stackusage | |
| parent | 69101271ba86aca3202c5ff746e0666f900added (diff) | |
macvlan: Fix potential use-after free for broadcasts
commit 260916dfb48c374f7840f3b86e69afd3afdb6e96 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
