]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: mcast snooping, fix length check of snooped MLDv1/2
authorLinus Lüssing <linus.luessing@web.de>
Sat, 26 Mar 2011 20:27:24 +0000 (20:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Mar 2011 09:28:20 +0000 (02:28 -0700)
commitf841c8a5790886a4e0218ac91fa896b97d3b9233
tree74a3d7cf9a7b10ad042eccf6adacf30aae8c7c15
parent58402c47099c0dcaf5b51ba1a2ead3aaa15ea061
bridge: mcast snooping, fix length check of snooped MLDv1/2

"len = ntohs(ip6h->payload_len)" does not include the length of the ipv6
header itself, which the rest of this function assumes, though.

This leads to a length check less restrictive as it should be in the
following line for one thing. For another, it very likely leads to an
integer underrun when substracting the offset and therefore to a very
high new value of 'len' due to its unsignedness. This will ultimately
lead to the pskb_trim_rcsum() practically never being called, even in
the cases where it should.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_multicast.c