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: <20250414103727.0ea92049@kernel.org>
Date: Mon, 14 Apr 2025 10:37:27 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: <syzbot+de1c7d68a10e3f123bdd@...kaller.appspotmail.com>,
 <cratiu@...dia.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
 <horms@...nel.org>, <linux-kernel@...r.kernel.org>,
 <netdev@...r.kernel.org>, <pabeni@...hat.com>, <sdf@...ichev.me>,
 <syzkaller-bugs@...glegroups.com>
Subject: Re: [syzbot] [net?] general protection fault in rtnl_create_link

On Sun, 13 Apr 2025 19:30:46 -0700 Kuniyuki Iwashima wrote:
> diff --git a/include/net/netdev_lock.h b/include/net/netdev_lock.h
> index 5706835a660c..270e157a4a79 100644
> --- a/include/net/netdev_lock.h
> +++ b/include/net/netdev_lock.h
> @@ -30,7 +30,8 @@ static inline bool netdev_need_ops_lock(const struct net_device *dev)
>  	bool ret = dev->request_ops_lock || !!dev->queue_mgmt_ops;
>  
>  #if IS_ENABLED(CONFIG_NET_SHAPER)
> -	ret |= !!dev->netdev_ops->net_shaper_ops;
> +	if (dev->netdev_ops)
> +		ret |= !!dev->netdev_ops->net_shaper_ops;
>  #endif

This is a bit surprising, we pretty much never validate if dev has ops.

I think we're guaranteed that IFF_UP will not be set if we just
allocated the device, so we can remove the locks in rtnl_create_link()
and to double confirm add a netdev_ops_assert_locked_or_invisible() 
in netif_state_change() ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ