Eric Dumazet ac6e780070 tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()

Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.

We first need to make sure no part of TCP header could be removed.
Then we need to adjust TCP_SKB_CB(skb)->end_seq

Many thanks to syzkaller team and Marco for giving us a reproducer.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Reported-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-13 12:30:02 -05:00
..
2015-08-25 13:38:50 -07:00
2016-04-27 22:48:24 -04:00
2016-10-20 14:32:22 -04:00
2016-10-20 14:32:22 -04:00
2016-04-27 22:48:23 -04:00
2016-10-26 17:33:22 -04:00
2016-09-21 00:23:01 -04:00
2016-09-21 00:23:01 -04:00
2016-09-21 00:23:01 -04:00
2016-09-01 14:09:01 -07:00
2016-06-10 23:07:49 -07:00
2016-09-21 00:23:00 -04:00
2016-11-03 16:12:06 -04:00
2016-10-20 14:32:22 -04:00
2016-10-26 17:33:22 -04:00
2015-09-17 17:18:37 -07:00