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] [day] [month] [year] [list]
Date:	Fri, 4 Apr 2014 09:52:04 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	Jiří Pírko <jiri@...nulli.us>,
	Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [Patch iproute2] ipaddress: do not add ifa_flags when not necessary

On Fri, Apr 4, 2014 at 6:59 AM, David Miller <davem@...emloft.net> wrote:
> From: Cong Wang <xiyou.wangcong@...il.com>
> Date: Thu,  3 Apr 2014 23:05:03 -0700
>
>> commit 37c9b94ed21d5779acc23d89a4 (add support for extended ifa_flags)
>> introduced a regression:
>>
>>       # ./ip/ip addr add 192.168.0.1/24 dev eth0
>>       RTNETLINK answers: Invalid argument
>>
>> This is due to old kernels don't support IFA_FLAGS flag, it should be skipped
>> if we don't use this feature at all.
>>
>> Cc: Jiri Pirko <jiri@...nulli.us>
>> Cc: Stephen Hemminger <stephen@...workplumber.org>
>> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
>
> Your patch doesn't really fully fix the problem.
>
> If the kernel rejects because of presence of the IFA_FLAGS attribute,
> it will do so for all such cases.
>
> Therefore the guard you need is not whether ifa_flags is NULL, but
> whether a large enough flag bit is set such that IFA_FLAGS is required.
>
> IFA_FLAGS was added because ifa.ifa_flags is too small for the new
> values we needed to add.

Right, we should use IFA_FLAGS only when ifa_flags > 0xFF.

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