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: <20251106143004.55f4f3fc@kernel.org>
Date: Thu, 6 Nov 2025 14:30:04 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Kuniyuki Iwashima <kuniyu@...gle.com>
Cc: syzbot+cif2d6d318f7e85f0b@...kaller.appspotmail.com,
 davem@...emloft.net, edumazet@...gle.com, hoang.h.le@...tech.com.au,
 horms@...nel.org, jmaloy@...hat.com, kuni1840@...il.com,
 netdev@...r.kernel.org, pabeni@...hat.com, syzbot@...ts.linux.dev,
 syzbot@...kaller.appspotmail.com, syzkaller-bugs@...glegroups.com,
 tipc-discussion@...ts.sourceforge.net
Subject: Re: [syzbot ci] Re: tipc: Fix use-after-free in
 tipc_mon_reinit_self().

On Thu,  6 Nov 2025 17:59:17 +0000 Kuniyuki Iwashima wrote:
> -void tipc_mon_reinit_self(struct net *net)
> +void tipc_mon_reinit_self(struct net *net, bool rtnl_held)
>  {
>  	struct tipc_monitor *mon;
>  	int bearer_id;
>  
> -	rtnl_lock();
> +	if (!rtnl_held)
> +		rtnl_lock();

I haven't looked closely but for the record conditional locking 
is generally considered to be poor code design. Extract the body
into a __tipc_mon_reinit_self() helper and call that when lock 
is already held? And:

void tipc_mon_reinit_self(struct net *net)
{
	rtnl_lock();
	__tipc_mon_reinit_self(net);
	rtnl_unlock();
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ