mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 12:25:31 +00:00
tcp: md5: release request socket instead of listener
If tcp_v4_inbound_md5_hash() returns an error, we must release
the refcount on the request socket, not on the listener.
The bug was added for IPv4 only.
Fixes: 079096f103
("tcp/dccp: install syn_recv requests into ehash table")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
372022830b
commit
729235554d
@ -1600,8 +1600,10 @@ process:
|
|||||||
struct sock *nsk = NULL;
|
struct sock *nsk = NULL;
|
||||||
|
|
||||||
sk = req->rsk_listener;
|
sk = req->rsk_listener;
|
||||||
if (tcp_v4_inbound_md5_hash(sk, skb))
|
if (unlikely(tcp_v4_inbound_md5_hash(sk, skb))) {
|
||||||
goto discard_and_relse;
|
reqsk_put(req);
|
||||||
|
goto discard_it;
|
||||||
|
}
|
||||||
if (likely(sk->sk_state == TCP_LISTEN)) {
|
if (likely(sk->sk_state == TCP_LISTEN)) {
|
||||||
nsk = tcp_check_req(sk, skb, req, false);
|
nsk = tcp_check_req(sk, skb, req, false);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user