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:   Fri, 25 Jun 2021 10:40:31 +0200
From:   Pali Rohár <pali@...nel.org>
To:     Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:     Marek Behún <kabel@...nel.org>,
        netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        linux-kernel@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Russell King <rmk+kernel@...linux.org.uk>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Phil Sutter <phil@....cc>
Subject: Re: Issues during assigning addresses on point to point interfaces

On Thursday 24 June 2021 14:57:41 Nicolas Dichtel wrote:
> Le 24/06/2021 à 12:45, Marek Behún a écrit :
> > On Sun, 6 Jun 2021 17:10:08 +0200
> > Pali Rohár <pali@...nel.org> wrote:
> > 
> >> Hello!
> >>
> >> Seems that there is a bug during assigning IP addresses on point to
> >> point interfaces.
> >>
> >> Assigning just one local address works fine:
> >>
> >>     ip address add fe80::6 dev ppp1 --> inet6 fe80::6/128 scope link
> >>
> >> Assigning both local and remote peer address also works fine:
> >>
> >>     ip address add fe80::7 peer fe80::8 dev ppp1 ---> inet6 fe80::7
> >> peer fe80::8/128 scope link
> >>
> >> But trying to assign just remote peer address does not work. Moreover
> >> "ip address" call does not fail, it returns zero but instead of
> >> setting remote peer address, it sets local address:
> >>
> >>     ip address add peer fe80::5 dev ppp1 --> inet6 fe80::5/128 scope
> >> link
> >>
> > 
> > Adding some other people to Cc in order to get their opinions.
> > 
> > It seems this bug is there from the beginning, from commit
> > caeaba79009c2 ("ipv6: add support of peer address")
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=caeaba79009c2
> > 
> > Maybe some older user-space utilities use IFA_ADDRESS instead of
> > IFA_LOCAL, and this was done in order to be compatible with them?
> If I remember well, there was an issue in the uAPI.
> IFA_LOCAL is supposed to be the address of the interface and IFA_ADDRESS is
> supposed to be the endpoint of a point-to-point interface.
> However, in case of IPv6, it was not the case. In netlink messages generated by
> the kernel, IFA_ADDRESS was used instead of IFA_LOCAL.
> The patch tried to keep the backward compatibility and the symmetry between msg
> from userland and notification from the kernel.

Hello Nicolas!

See my original email where I put also rtnetlink packets (how strace see
them). Seems that there is a bug in handling them (or bug in iproute2)
as setting just peer (remote) IPv6 address is ignored:
https://lore.kernel.org/netdev/20210606151008.7dwx5ukrlvxt4t3k@pali/

Do you have any idea if this is affected by that "issue in the uAPI"?
And what is the way how to fix it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ