lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 19 Mar 2019 14:13:14 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     gnault@...hat.com
Cc:     netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next] tcp: free request sock directly upon TFO or
 syncookies error

From: Guillaume Nault <gnault@...hat.com>
Date: Tue, 19 Mar 2019 16:05:44 +0100

> Since the request socket is created locally, it'd make more sense to
> use reqsk_free() instead of reqsk_put() in TFO and syncookies' error
> path.
> 
> However, tcp_get_cookie_sock() may set ->rsk_refcnt before freeing the
> socket; tcp_conn_request() may also have non-null ->rsk_refcnt because
> of tcp_try_fastopen(). In both cases 'req' hasn't been exposed
> to the outside world and is safe to free immediately, but that'd
> trigger the WARN_ON_ONCE in reqsk_free().
> 
> Define __reqsk_free() for these situations where we know nobody's
> referencing the socket, even though ->rsk_refcnt might be non-null.
> Now we can consolidate the error path of tcp_get_cookie_sock() and
> tcp_conn_request().
> 
> Signed-off-by: Guillaume Nault <gnault@...hat.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ