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: <CAJGXZLgtLLMGsgn4EXO1VNiO0KvVah_jPHCmYU_zNM-_XnEOOA@mail.gmail.com>
Date:   Thu, 28 Jul 2022 16:54:01 +0300
From:   Aleksey Shumnik <ashumnik9@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Ido Schimmel <idosch@...sch.org>, netdev@...r.kernel.org,
        David Ahern <dsahern@...il.com>, kuznet@....inr.ac.ru,
        xeb@...l.ru
Subject: Re: [PATCH] net/ipv4/ip_gre.c net/ipv6/ip6_gre.c: ip and gre header
 are recorded twice

On Fri, Jul 8, 2022 at 2:23 AM Jakub Kicinski <kuba@...nel.org> wrote:
> On Thu, 7 Jul 2022 19:41:23 +0300 Aleksey Shumnik wrote:
>
> Yeah, I've added the neigh entries (although the v6 addresses had to
> be massaged a little for ip neigh to take them, the commands from the
> email don't work cause iproute2 doesn't support :: in lladdr, AFAICT).
>
> What I've seen in tracing was that I hit:
>
> ip6gre_tunnel_xmit() -> ip6_tnl_xmit_ctl() -> ip6_tnl_get_cap()
>
> that returns IP6_TNL_F_CAP_PER_PACKET
>
> so back to ip6gre_tunnel_xmit() -> goto tx_err -> error, drop
>
> packet never leaves the interface.

I skipped this check so that the packets wouldn't drop.
I compared the implementations of ip_gre.c and ip6_gre.c and I
concluded that in ip6_tnl_xmit_ctl() instead of tunnel params
(&ip6_tnl->parms.laddr and &ip6_tnl->parms.raddr) it is better to use
skb network header (ipv6_hdr(skb)->saddr and ipv6_hdr(skb)->daddr).
It is illogical to use the tunnel parameters, because if we have an
NBMA connection, the addresses will not be set in the tunnel
parameters and packets will always drop on ip6_tnl_xmit_ctl().

> Hm, so you did get v6 to repro? Not sure what I'm doing wrong, I'm
> trying to repro with a net namespace over veth but that can't be it...

Yes, just skip ip6_tnl_xmit_ctl().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ