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: <c84e2303-2240-4bd7-a0d9-2e1d4d0c0677@redhat.com>
Date: Thu, 19 Jun 2025 14:33:56 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Kuniyuki Iwashima <kuni1840@...il.com>,
 "David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>
Cc: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuniyu@...gle.com>,
 netdev@...r.kernel.org
Subject: Re: [PATCH v1 net-next 06/15] ipv6: mcast: Don't hold RTNL for
 IPV6_ADD_MEMBERSHIP and MCAST_JOIN_GROUP.

On 6/17/25 1:28 AM, Kuniyuki Iwashima wrote:
> From: Kuniyuki Iwashima <kuniyu@...gle.com>
> 
> In __ipv6_sock_mc_join(), per-socket mld data is protected by lock_sock(),
> and only __dev_get_by_index() requires RTNL.
> 
> Let's use dev_get_by_index() and drop RTNL for IPV6_ADD_MEMBERSHIP and
> MCAST_JOIN_GROUP.
> 
> Note that when we fetch dev from rt6_lookup(), we can call dev_hold()
> safely for rt->dst.dev as it already holds refcnt for the dev if exists.

I'm not 110% sure it's safe. AFAICS a racing dst_dev_put() could
potentially release the rt->dst reference concurrently???
The race looks quite orthogonal to the patchset, but double-checking I'm
not missing anything.

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ