Eric Dumazet 03bc31b9e8 tcp: initialize tp->copied_seq in case of cross SYN connection
[ Upstream commit 142a2e7ece8d8ac0e818eb2c91f99ca894730e2a ]

Dmitry provided a syzkaller (http://github.com/google/syzkaller)
generated program that triggers the WARNING at
net/ipv4/tcp.c:1729 in tcp_recvmsg() :

WARN_ON(tp->copied_seq != tp->rcv_nxt &&
        !(flags & (MSG_PEEK | MSG_TRUNC)));

His program is specifically attempting a Cross SYN TCP exchange,
that we support (for the pleasure of hackers ?), but it looks we
lack proper tcp->copied_seq initialization.

Thanks again Dmitry for your report and testings.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit 6cfa9781d3bf950eed455369966bbdf9d05871c5)
Signed-off-by: Willy Tarreau <w@1wt.eu>
2016-01-29 22:12:49 +01:00
..
2009-09-14 17:03:01 -07:00
2009-09-01 17:40:57 -07:00
2014-05-19 07:53:59 +02:00
2009-09-14 17:03:01 -07:00
2009-08-28 23:57:15 -07:00
2013-06-10 11:43:31 +02:00
2009-09-14 17:03:01 -07:00
2009-09-14 17:03:01 -07:00
2009-06-13 23:36:32 -07:00
2008-10-07 08:38:24 +11:00
2009-06-03 02:51:04 -07:00
2009-04-27 02:45:02 -07:00
2009-09-14 17:03:01 -07:00
2013-06-10 11:43:27 +02:00
2009-03-02 03:00:15 -08:00
2009-03-02 03:00:14 -08:00
2009-03-13 16:05:14 -07:00
2009-03-02 03:00:15 -08:00
2014-05-19 07:53:41 +02:00
2009-09-14 17:03:01 -07:00
2009-09-14 17:03:01 -07:00
2009-06-03 02:51:04 -07:00
2009-06-03 02:51:04 -07:00