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: <d49e7e72-49cd-fbc7-1b2e-7cc6e38b1dc6@kernel.org>
Date:   Thu, 31 Mar 2022 19:41:09 -0600
From:   David Ahern <dsahern@...nel.org>
To:     Eyal Birger <eyal.birger@...il.com>, davem@...emloft.net,
        kuba@...nel.org, pabeni@...hat.com, andrea.mayer@...roma2.it
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net] vrf: fix packet sniffing for traffic originating from
 ip tunnels

On 3/31/22 1:26 AM, Eyal Birger wrote:
> in commit 048939088220
> ("vrf: add mac header for tunneled packets when sniffer is attached")
> an Ethernet header was cooked for traffic originating from tunnel devices.
> 
> However, the header is added based on whether the mac_header is unset
> and ignores cases where the device doesn't expose a mac header to upper
> layers, such as in ip tunnels like ipip and gre.
> 
> Traffic originating from such devices still appears garbled when capturing
> on the vrf device.
> 
> Fix by observing whether the original device exposes a header to upper
> layers, similar to the logic done in af_packet.
> 
> In addition, skb->mac_len needs to be adjusted after adding the Ethernet
> header for the skb_push/pull() surrounding dev_queue_xmit_nit() to work
> on these packets.
> 
> Fixes: 048939088220 ("vrf: add mac header for tunneled packets when sniffer is attached")
> Signed-off-by: Eyal Birger <eyal.birger@...il.com>
> ---
>  drivers/net/vrf.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ