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: <aAKFZT6sPCZX63y6@duo.ucw.cz>
Date: Fri, 18 Apr 2025 19:01:25 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Stanislav Fomichev <sdf@...ichev.me>,
	syzbot+b0c03d76056ef6cd12a6@...kaller.appspotmail.com,
	Simon Horman <horms@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	aleksander.lobakin@...el.com, kory.maincent@...tlin.com,
	netdev@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 5.10 13/15] net: vlan: don't propagate flags on
 open

On Thu 2025-04-03 15:10:00, Sasha Levin wrote:
> From: Stanislav Fomichev <sdf@...ichev.me>
> 
> [ Upstream commit 27b918007d96402aba10ed52a6af8015230f1793 ]
> 
> With the device instance lock, there is now a possibility of a deadlock:

"now". Does the same problem exist in 5.10?

Best regards,
								Pavel

> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -272,17 +272,6 @@ static int vlan_dev_open(struct net_device *dev)
>  			goto out;
>  	}
>  
> -	if (dev->flags & IFF_ALLMULTI) {
> -		err = dev_set_allmulti(real_dev, 1);
> -		if (err < 0)
> -			goto del_unicast;
> -	}
> -	if (dev->flags & IFF_PROMISC) {
> -		err = dev_set_promiscuity(real_dev, 1);
> -		if (err < 0)
> -			goto clear_allmulti;
> -	}
> -
>  	ether_addr_copy(vlan->real_dev_addr, real_dev->dev_addr);
>  
>  	if (vlan->flags & VLAN_FLAG_GVRP)
> @@ -296,12 +285,6 @@ static int vlan_dev_open(struct net_device *dev)
>  		netif_carrier_on(dev);
>  	return 0;
>  
> -clear_allmulti:
> -	if (dev->flags & IFF_ALLMULTI)
> -		dev_set_allmulti(real_dev, -1);
> -del_unicast:
> -	if (!ether_addr_equal(dev->dev_addr, real_dev->dev_addr))
> -		dev_uc_del(real_dev, dev->dev_addr);
>  out:
>  	netif_carrier_off(dev);
>  	return err;
> @@ -314,10 +297,6 @@ static int vlan_dev_stop(struct net_device *dev)
>  
>  	dev_mc_unsync(real_dev, dev);
>  	dev_uc_unsync(real_dev, dev);
> -	if (dev->flags & IFF_ALLMULTI)
> -		dev_set_allmulti(real_dev, -1);
> -	if (dev->flags & IFF_PROMISC)
> -		dev_set_promiscuity(real_dev, -1);
>  
>  	if (!ether_addr_equal(dev->dev_addr, real_dev->dev_addr))
>  		dev_uc_del(real_dev, dev->dev_addr);
> @@ -474,12 +453,10 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
>  {
>  	struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
>  
> -	if (dev->flags & IFF_UP) {
> -		if (change & IFF_ALLMULTI)
> -			dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
> -		if (change & IFF_PROMISC)
> -			dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1);
> -	}
> +	if (change & IFF_ALLMULTI)
> +		dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
> +	if (change & IFF_PROMISC)
> +		dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1);
>  }
>  
>  static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)

-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ