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: <20121115101238.GA2807@minipsycho.orion>
Date:	Thu, 15 Nov 2012 11:12:38 +0100
From:	Jiri Pirko <jiri@...nulli.us>
To:	David Miller <davem@...emloft.net>
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()

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.



--
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