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: <20180326160719.GC92743@C02RW35GFVH8>
Date:   Mon, 26 Mar 2018 12:07:19 -0400
From:   Andy Gospodarek <andrew.gospodarek@...adcom.com>
To:     Xin Long <lucien.xin@...il.com>
Cc:     network dev <netdev@...r.kernel.org>, davem@...emloft.net,
        Jiri Pirko <jiri@...nulli.us>,
        Wang Chen <wangchen@...fujitsu.com>,
        Veaceslav Falico <vfalico@...hat.com>,
        Nikolay Aleksandrov <nikolay@...hat.com>
Subject: Re: [PATCH net 3/3] bonding: process the err returned by
 dev_set_allmulti properly in bond_enslave

On Mon, Mar 26, 2018 at 01:16:47AM +0800, Xin Long wrote:
> When dev_set_promiscuity(1) succeeds but dev_set_allmulti(1) fails,
> dev_set_promiscuity(-1) should be done before going to the err path.
> Otherwise, dev->promiscuity will leak.
> 
> Fixes: 7e1a1ac1fbaa ("bonding: Check return of dev_set_promiscuity/allmulti")
> Signed-off-by: Xin Long <lucien.xin@...il.com>

Acked-by: Andy Gospodarek <andy@...yhouse.net>

> ---
>  drivers/net/bonding/bond_main.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 55e1985..b7b1130 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1706,8 +1706,11 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
>  		/* set allmulti level to new slave */
>  		if (bond_dev->flags & IFF_ALLMULTI) {
>  			res = dev_set_allmulti(slave_dev, 1);
> -			if (res)
> +			if (res) {
> +				if (bond_dev->flags & IFF_PROMISC)
> +					dev_set_promiscuity(slave_dev, -1);
>  				goto err_sysfs_del;
> +			}
>  		}
>  
>  		netif_addr_lock_bh(bond_dev);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ