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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Jun 2022 18:18:27 +0300
From:   Aleksey Shumnik <ashumnik9@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        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, Jun 24, 2022 at 8:17 PM Jakub Kicinski <kuba@...nel.org> wrote:
> On Fri, 24 Jun 2022 16:51:41 +0300 Aleksey Shumnik wrote:
> > On Fri, Jun 24, 2022 at 6:26 AM Jakub Kicinski <kuba@...nel.org> wrote:
> > > > I use SOCK_DGRAM
> > >
> > > Strange.
> >
> > Why is it strange?
>
> I meant surprising, I'd have thought we could miss something like that
> for RAW sockets maybe but DGRAM/ICMP should work.

I was surprised too.

> > > > I want to find out, the creation of gre and ip header twice, is it a
> > > > feature or a bug?
> > >
> > > I can't think why that'd be a feature. Could add this case to selftests
> > > to show how to repro and catch regressions?
> >
> > I don't really know how to do it, but I'll try
> > If we just talk about selftests/net, then everything has passed
>
> What I'm looking for is a bash(?) script which sets up the tunnel sends
> a packet and checks if the headers are valid.

I'm creating a file "mgre0" on spok, and use ifup to create the interface:

auto mgre0
iface mgre0 inet6 static
address 2001:470::1
netmask 64
pre-up ip tunnel add mgre0 mode ip6gre local 4444::1111 key 1 ttl 64 tos inherit
pre-up ethtool -K mgre0 tx off > /dev/null
pre-up ip link set mgre0 mtu 1400
pre-up ip link set mgre0 multicast on
post-down ip link del mgre0

do the same on hub:

auto mgre0
iface mgre0 inet6 static
address 2001:470::100
netmask 64
pre-up ip tunnel add mgre0 mode ip6gre local 4444::4444 key 1 ttl 64 tos inherit
pre-up ethtool -K mgre0 tx off > /dev/null
pre-up ip link set mgre0 mtu 1400
pre-up ip link set mgre0 multicast on
post-down ip link del mgre0

then I use ip neigh to add an entry to the neighbors table
spok:
$ ip -6 neigh add 2001:470::100 lladdr 4444::4444 dev mgre0

hub:
$ ip -6 neigh add 2001:470::1 lladdr 4444::1111 dev mgre0

and then ping hub from spok
$ ping 2001:470::100

To check if the headers are valid, I use tcpdump and look at the packets

> > > > I did everything according to the instructions, hope everything is
> > > > correct this time.
> > >
> > > Nope, still mangled.
> >
> > Strangely, everything works fine for me
>
> Depends on definition of "works", are you saying you can download this:
>
> https://lore.kernel.org/all/CAJGXZLiNo=G=5889sPyiCZVjRf65Ygov3=DWFgKmay+Dy3wCYw@mail.gmail.com/raw
>
> which is your email in text form and `git am` will accept that as a
> patch?

I use the kernel version 5.10.70.
I copy the code (starting from "diff" and up to the end), create a
patch file and apply it to the kernel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ