Files
linux/net/ipv4
Paolo Abeni 7e963e31de 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:09:17 +01:00
..
2015-08-25 13:38:50 -07:00
2017-02-13 22:15:03 -05:00
2016-10-20 14:32:22 -04:00
2016-04-27 22:48:23 -04:00
2017-02-26 11:09:17 +01:00
2017-02-08 13:58:21 -05:00
2016-06-10 23:07:49 -07:00
2017-02-14 22:19:39 -05:00
2016-09-21 00:23:00 -04:00
2016-10-20 14:32:22 -04:00
2017-02-07 11:19:00 -05:00
2015-09-17 17:18:37 -07:00