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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211209092036.GK427717@gauss3.secunet.de>
Date:   Thu, 9 Dec 2021 10:20:36 +0100
From:   Steffen Klassert <steffen.klassert@...unet.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
CC:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Cong Wang <amwang@...hat.com>
Subject: Re: [PATCH net-next] xfrm: use net device refcount tracker helpers

On Tue, Dec 07, 2021 at 11:32:03AM -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
> 
> xfrm4_fill_dst() and xfrm6_fill_dst() build dst,
> getting a device reference that will likely be released
> by standard dst_release() code.
> 
> We have to track these references or risk a warning if
> CONFIG_NET_DEV_REFCNT_TRACKER=y
> 
> Note to XFRM maintainers :
> 
> Error path in xfrm6_fill_dst() releases the reference,
> but does not clear xdst->u.dst.dev, so I wonder
> if this could lead to double dev_put() in some cases,
> where a dst_release() _is_ called by the callers in their
> error path.

Yes, looks like it can, so this should be fixed.

> 
> This extra dev_put() was added in commit 84c4a9dfbf430 ("xfrm6:
> release dev before returning error")
> 
> Fixes: 9038c320001d ("net: dst: add net device refcount tracking to dst_entry")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Cong Wang <amwang@...hat.com>
> Cc: Steffen Klassert <steffen.klassert@...unet.com>

As the refcount tracking infrastructure is not yet in ipsec-next:

Acked-by: Steffen Klassert <steffen.klassert@...unet.com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ