]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: bridge: mcast: fix stale ipv6 hdr pointer when handling v6 query
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 2 Jul 2019 12:00:19 +0000 (15:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2019 06:28:33 +0000 (08:28 +0200)
commit0b159b8b49b7c22eb4815710f365c8a53af0f148
tree8370d4f356a0d11e97b786f778012e3b2886720f
parentaa1a26b4d8b68dda13f997b67415632c1d963e45
net: bridge: mcast: fix stale ipv6 hdr pointer when handling v6 query

[ Upstream commit 3b26a5d03d35d8f732d75951218983c0f7f68dff ]

We get a pointer to the ipv6 hdr in br_ip6_multicast_query but we may
call pskb_may_pull afterwards and end up using a stale pointer.
So use the header directly, it's just 1 place where it's needed.

Fixes: 08b202b67264 ("bridge br_multicast: IPv6 MLD support.")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tested-by: Martin Weinelt <martin@linuxlounge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/br_multicast.c