Files
twx-linux/net/ipv4
Paolo Abeni 481aedf869 ip: fix IP_CHECKSUM handling
[ Upstream commit ca4ef4574f ]

The skbs processed by ip_cmsg_recv() are not guaranteed to
be linear e.g. when sending UDP packets over loopback with
MSGMORE.
Using csum_partial() on [potentially] the whole skb len
is dangerous; instead be on the safe side and use skb_checksum().

Thanks to syzkaller team to detect the issue and provide the
reproducer.

v1 -> v2:
 - move the variable declaration in a tighter scope

Fixes: ad6f939ab1 ("ip: Add offset parameter to ip_cmsg_recv")
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-26 11:10:51 +01:00
..
2016-11-29 20:45:54 -05:00
2016-10-20 14:32:22 -04:00
2016-10-20 14:32:22 -04:00
2017-02-26 11:10:51 +01:00
2016-09-21 00:23:01 -04:00
2017-02-18 15:11:43 +01:00
2016-09-21 00:23:01 -04:00
2016-09-01 14:09:01 -07:00
2016-09-21 00:23:00 -04:00
2016-10-20 14:32:22 -04:00
2016-11-24 15:32:14 -05:00