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] [day] [month] [year] [list]
Message-ID: <CANn89i+Mg56hG_Z4N0KnJ=9c2mTHQAHTQEJ1dbagBpjhijAoxQ@mail.gmail.com>
Date: Tue, 24 Sep 2024 13:41:20 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Anton Danilov <littlesmilingcloud@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, 
	David Ahern <dsahern@...nel.org>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Shigeru Yoshida <syoshida@...hat.com>, Suman Ghosh <sumang@...vell.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH net v2] ipv4: ip_gre: Fix drops of small packets in ipgre_xmit

On Tue, Sep 24, 2024 at 3:31 AM Anton Danilov
<littlesmilingcloud@...il.com> wrote:
>
> Regression Description:
>
> Depending on the GRE tunnel device options, small packets are being
> dropped. This occurs because the pskb_network_may_pull function fails due
> to insufficient space in the network header.

I find this a bit confusing.

Perhaps explain that pskb_network_may_pull() is adding 20 extra bytes,
to the 28 needed bytes (20 for the IPv4 header, 8 bytes for GRE)

So, instead of making sure 28 bytes were present in skb->head, we were
requesting 48
bytes. For small packets, this was failing.

> For example, if only the key
> option is specified for the tunnel device, packets of sizes up to 27
> (including the IPv4 header itself) will be dropped. This affects both
> locally originated and forwarded packets in the DMVPN-like setups.
>
> How to reproduce (for local originated packets):
>
>   ip link add dev gre1 type gre ikey 1.9.8.4 okey 1.9.8.4 \
>           local <your-ip> remote 0.0.0.0
>
>   ip link set mtu 1400 dev gre1
>   ip link set up dev gre1
>   ip address add 192.168.13.1/24 dev gre1
>   ip neighbor add 192.168.13.2 lladdr <remote-ip> dev gre1
>   ping -s 1374 -c 10 192.168.13.2
>   tcpdump -vni gre1
>   tcpdump -vni <your-ext-iface> 'ip proto 47'
>   ip -s -s -d link show dev gre1
>
> Solution:
>
> Use the pskb_may_pull function instead the pskb_network_may_pull.
>
> Fixes: 80d875cfc9d3 ("ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()")
> Signed-off-by: Anton Danilov <littlesmilingcloud@...il.com>

Please send a V3 without the RFC tag in the title.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ