[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150810.211830.520449658624351173.davem@davemloft.net>
Date: Mon, 10 Aug 2015 21:18:30 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net] inet: fix possible request socket leak
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Mon, 10 Aug 2015 15:07:34 -0700
> From: Eric Dumazet <edumazet@...gle.com>
>
> In commit b357a364c57c9 ("inet: fix possible panic in
> reqsk_queue_unlink()"), I missed fact that tcp_check_req()
> can return the listener socket in one case, and that we must
> release the request socket refcount or we leak it.
>
> Tested:
>
> Following packetdrill test template shows the issue
>
> 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
> +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> +0 bind(3, ..., ...) = 0
> +0 listen(3, 1) = 0
>
> +0 < S 0:0(0) win 2920 <mss 1460,sackOK,nop,nop>
> +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK>
> +.002 < . 1:1(0) ack 21 win 2920
> +0 > R 21:21(0)
>
> Fixes: b357a364c57c9 ("inet: fix possible panic in reqsk_queue_unlink()")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists