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]
Date: Thu, 23 May 2024 15:28:07 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Ido Schimmel <idosch@...dia.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org, 
	pabeni@...hat.com, dsahern@...nel.org, petrm@...dia.com, cjubran@...dia.com, 
	ysafadi@...dia.com
Subject: Re: [PATCH net] ipv4: Fix address dump when IPv4 is disabled on an interface

On Thu, May 23, 2024 at 1:04 PM Ido Schimmel <idosch@...dia.com> wrote:
>
> Cited commit started returning an error when user space requests to dump
> the interface's IPv4 addresses and IPv4 is disabled on the interface.
> Restore the previous behavior and do not return an error.
>
> Before cited commit:
>
>  # ip address show dev dummy1
>  10: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
>      link/ether e2:40:68:98:d0:18 brd ff:ff:ff:ff:ff:ff
>      inet6 fe80::e040:68ff:fe98:d018/64 scope link proto kernel_ll
>         valid_lft forever preferred_lft forever
>  # ip link set dev dummy1 mtu 67
>  # ip address show dev dummy1
>  10: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 67 qdisc noqueue state UNKNOWN group default qlen 1000
>      link/ether e2:40:68:98:d0:18 brd ff:ff:ff:ff:ff:ff
>
> After cited commit:
>
>  # ip address show dev dummy1
>  10: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
>      link/ether 32:2d:69:f2:9c:99 brd ff:ff:ff:ff:ff:ff
>      inet6 fe80::302d:69ff:fef2:9c99/64 scope link proto kernel_ll
>         valid_lft forever preferred_lft forever
>  # ip link set dev dummy1 mtu 67
>  # ip address show dev dummy1
>  RTNETLINK answers: No such device
>  Dump terminated
>
> With this patch:
>
>  # ip address show dev dummy1
>  10: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
>      link/ether de:17:56:bb:57:c0 brd ff:ff:ff:ff:ff:ff
>      inet6 fe80::dc17:56ff:febb:57c0/64 scope link proto kernel_ll
>         valid_lft forever preferred_lft forever
>  # ip link set dev dummy1 mtu 67
>  # ip address show dev dummy1
>  10: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 67 qdisc noqueue state UNKNOWN group default qlen 1000
>      link/ether de:17:56:bb:57:c0 brd ff:ff:ff:ff:ff:ff
>
> I fixed the exact same issue for IPv6 in commit c04f7dfe6ec2 ("ipv6: Fix
> address dump when IPv6 is disabled on an interface"), but noted [1] that
> I am not doing the change for IPv4 because I am not aware of a way to
> disable IPv4 on an interface other than unregistering it. I clearly
> missed the above case.
>
> [1] https://lore.kernel.org/netdev/20240321173042.2151756-1-idosch@nvidia.com/
>
> Fixes: cdb2f80f1c10 ("inet: use xa_array iterator to implement inet_dump_ifaddr()")
> Reported-by: Carolina Jubran <cjubran@...dia.com>
> Reported-by: Yamen Safadi <ysafadi@...dia.com>
> Tested-by: Carolina Jubran <cjubran@...dia.com>
> Reviewed-by: Petr Machata <petrm@...dia.com>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> ---

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ