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: <20250328022204.12804-1-kuniyu@amazon.com>
Date: Thu, 27 Mar 2025 19:15:00 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <i.abramov@...integration.ru>
CC: <aleksander.lobakin@...el.com>, <davem@...emloft.net>,
	<ebiederm@...ssion.com>, <edumazet@...gle.com>, <horms@...nel.org>,
	<jdamato@...tly.com>, <kuba@...nel.org>, <kuniyu@...zon.com>,
	<leitao@...ian.org>, <linux-kernel@...r.kernel.org>,
	<lvc-project@...uxtesting.org>, <netdev@...r.kernel.org>,
	<pabeni@...hat.com>, <syzbot+1df6ffa7a6274ae264db@...kaller.appspotmail.com>
Subject: Re: [PATCH] net: Avoid calling WARN_ON() on -ENOMEM in __dev_change_net_namespace()


> Subject: [PATCH] net: Avoid calling WARN_ON() on -ENOMEM in __dev_change_net_namespace()

s/__dev_change_net_namespace/netif_change_net_namespace/

Also, please specify the target tree: [PATCH v2 net]


From: Ivan Abramov <i.abramov@...integration.ru>
Date: Fri, 28 Mar 2025 04:12:57 +0300
> It's pointless to call WARN_ON() in case of an allocation failure in
> device_rename(), since it only leads to useless splats caused by deliberate
> fault injections, so avoid it.
> 
> Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
> 
> Fixes: 8b41d1887db7 ("[NET]: Fix running without sysfs")

Reported-by: syzbot+1df6ffa7a6274ae264db@...kaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/000000000000a45a92061ce6cc7d@google.com/


> Signed-off-by: Ivan Abramov <i.abramov@...integration.ru>
> ---
>  net/core/dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 2f7f5fd9ffec..14726cc8796b 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -12102,7 +12102,7 @@ int __dev_change_net_namespace(struct net_device *dev, struct net *net,

It applies cleanly but please make sure to use the latest tree.



>  	dev_set_uevent_suppress(&dev->dev, 1);
>  	err = device_rename(&dev->dev, dev->name);
>  	dev_set_uevent_suppress(&dev->dev, 0);
> -	WARN_ON(err);
> +	WARN_ON(err && err != -ENOMEM);
>  
>  	/* Send a netdev-add uevent to the new namespace */
>  	kobject_uevent(&dev->dev.kobj, KOBJ_ADD);
> -- 
> 2.39.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ