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, 4 Aug 2019 07:33:35 +0000 (09:33 +0200)
commit2aabe0db5dc0cce6d6be37f0d8adfb3efb434efe
treee1f193938d470826c6c7aee2d47b404b6a595abe
parentdddb75a126856843e57f78feff807c4c40389c10
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