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, 29 Apr 2022 15:05:23 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     Eric Dumazet <eric.dumazet@...il.com>,
        Netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: Re: Routing loops & TTL tracking with tunnel devices

On Fri, Apr 29, 2022 at 2:54 PM Jason A. Donenfeld <Jason@...c4.com> wrote:
>
> Hi Eric,
>
> On Fri, Apr 29, 2022 at 11:14 PM Eric Dumazet <eric.dumazet@...il.com> wrote:
> >
> >
> > On 4/29/22 14:07, Jason A. Donenfeld wrote:
> >
> > Hi Eric,
> >
> > On Fri, Apr 29, 2022 at 01:54:27PM -0700, Eric Dumazet wrote:
> >
> > Anyway, it'd be nice if there were a free u8 somewhere in sk_buff that I
> > could use for tracking times through the stack. Other kernels have this
> > but afaict Linux still does not. I looked into trying to overload some
> > existing fields -- tstamp/skb_mstamp_ns or queue_mapping -- which I was
> > thinking might be totally unused on TX?
> >
> > if skbs are stored in some internal wireguard queue, can not you use
> > skb->cb[],
> >
> > like many other layers do ?
> >
> > This isn't for some internal wireguard queue. The packets get sent out
> > of udp_tunnel_xmit_skb(), so they leave wireguard's queues.
> >
> >
> > OK, where is the queue then ?
> >
> > dev_xmit_recursion() is supposed to catch long chains of virtual devices.
>
> This is the long-chain-of-virtual-devices case indeed. But
> dev_xmit_recursion() does not help here, since that's just a per-cpu
> increment, assuming that the packet actually gets xmit'd in its
> ndo_start_xmit function. But in reality, wireguard queues up the
> packet, encrypts it in some worker later, and eventually transmits it
> with udp_tunnel_xmit_skb(). All the while ndo_start_xmit() has long
> returned. So no help from dev_xmit_recursion().
>

I assume you add encap headers to the skb ?

You could check if the wireguard header is there already, or if the
amount of headers is crazy.

net/core/flow_dissector.c might help.

You also can take a look at CONFIG_SKB_EXTENSIONS infrastructure.

Powered by blists - more mailing lists