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: <20121115.175835.2209521940651702184.davem@davemloft.net>
Date:	Thu, 15 Nov 2012 17:58:35 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	jiri@...nulli.us
Cc:	netdev@...r.kernel.org, eric.dumazet@...il.com,
	shemminger@...tta.com, john.r.fastabend@...el.com
Subject: Re: [patch net] net: correct check in dev_addr_del()

From: Jiri Pirko <jiri@...nulli.us>
Date: Thu, 15 Nov 2012 11:12:38 +0100

> Thu, Nov 15, 2012 at 03:52:54AM CET, davem@...emloft.net wrote:
>>From: Jiri Pirko <jiri@...nulli.us>
>>Date: Wed, 14 Nov 2012 13:51:04 +0100
>>
>>> Check (ha->addr == dev->dev_addr) is always true because dev_addr_init()
>>> sets this. Correct the check to behave properly on addr removal.
>>> 
>>> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
>>
>>I'm pretty sure this is very intentional.
>>
>>It's trying to prevent deletion of the implicit dev->dev_addr
>>entry.  But it will allow decementing the reference count to
>>1, but no further.
>>
>>I'm not applying this.
> 
> Please look at dev_addr_init(), line 266:
> dev->dev_addr = ha->addr;
> 
> and that is never changed.
> Therefore check (ha->addr == dev->dev_addr) in dev_addr_del() is always
> true and has no meaning.
> 
> dev_addr_del() should check if the address passed in "const unsigned
> char *addr" function arg is the same as in ha->addr (dev->dev_addr) and
> prevent to remove it in that case. And that is what this patch does.

Thanks for explaining.  I misread the code and thought that 'ha'
was already the object looked up using 'addr' as the key.

Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ