Wei Wang 7db92362d2 tcp: fix potential double free issue for fastopen_req
tp->fastopen_req could potentially be double freed if a malicious
user does the following:
1. Enable TCP_FASTOPEN_CONNECT sockopt and do a connect() on the socket.
2. Call connect() with AF_UNSPEC to disconnect the socket.
3. Make this socket a listening socket by calling listen().
4. Accept incoming connections and generate child sockets. All child
   sockets will get a copy of the pointer of fastopen_req.
5. Call close() on all sockets. fastopen_req will get freed multiple
   times.

Fixes: 19f6d3f3c842 ("net/tcp-fastopen: Add new API support")
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-02 14:05:41 -08:00
..
2017-02-13 22:15:03 -05:00
2017-02-27 18:43:47 -08:00
2016-10-20 14:32:22 -04:00
2017-01-13 22:37:16 -05:00
2016-04-27 22:48:23 -04:00
2017-02-21 12:23:53 -05:00
2017-02-27 18:43:47 -08:00
2017-02-15 11:04:11 +01:00
2017-02-26 11:03:38 -05:00
2016-06-10 23:07:49 -07:00
2016-09-21 00:23:00 -04:00
2017-01-13 22:37:16 -05:00
2016-10-20 14:32:22 -04:00
2017-02-15 11:04:11 +01:00
2017-01-10 10:57:12 +01:00