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>] [day] [month] [year] [list]
Date:   Thu, 22 Oct 2020 17:48:07 +1100
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     "zhuoliang.zhang" <zhuoliang.zhang@...iatek.com>
Cc:     Steffen Klassert <steffen.klassert@...unet.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, wsd_upstream@...iatek.com
Subject: Re: [PATCH] net: xfrm: fix a race condition during allocing spi

On Thu, Oct 22, 2020 at 01:53:15PM +0800, zhuoliang.zhang wrote:
> 
> there are 2 related hash lists : net->xfrm.state_bydst and
> net->xfrm.state_byspi:
> 
> 1. a new state x is alloced in xfrm_state_alloc() and added into the
> bydst hlist in  __find_acq_core() on the LHS;
> 2. on the RHS, state_hash_work thread travels the old bydst and tranfers
> every xfrm_state (include x) to the new bydst hlist and new byspi hlist;
> 3. user thread on the LHS gets the lock and adds x to the new byspi
> hlist again.

Good catch.  Please add a Fixes header.  I think this was introduced
with the dynamic resizing in f034b5d4efdfe0fb9e2a1ce1d95fa7914f24de49.

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ