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  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:   Mon, 27 Apr 2020 23:00:31 +0200
From:   Toke Høiland-Jørgensen <>
To:     "Jason A. Donenfeld" <>,
Cc:     "Jason A. Donenfeld" <>,
        Adhipati Blambangan <>,
        David Ahern <>
Subject: Re: [PATCH net v3] net: xdp: account for layer 3 packets in generic skb handler

"Jason A. Donenfeld" <> writes:

> A user reported that packets from wireguard were possibly ignored by XDP
> [1]. Apparently, the generic skb xdp handler path seems to assume that
> packets will always have an ethernet header, which really isn't always
> the case for layer 3 packets, which are produced by multiple drivers.
> This patch fixes the oversight. If the mac_len is 0, then we assume
> that it's a layer 3 packet, and in that case prepend a pseudo ethhdr to
> the packet whose h_proto is copied from skb->protocol, which will have
> the appropriate v4 or v6 ethertype. This allows us to keep XDP programs'
> assumption correct about packets always having that ethernet header, so
> that existing code doesn't break, while still allowing layer 3 devices
> to use the generic XDP handler.
> [1]
> Reported-by: Adhipati Blambangan <>
> Cc: David Ahern <>
> Cc: Toke Høiland-Jørgensen <>
> Signed-off-by: Jason A. Donenfeld <>

Acked-by: Toke Høiland-Jørgensen <>

Powered by blists - more mailing lists