[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 4 Apr 2024 10:00:35 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Paolo Abeni
<pabeni@...hat.com>, netdev@...r.kernel.org, eric.dumazet@...il.com,
syzbot+9ee20ec1de7b3168db09@...kaller.appspotmail.com, Phillip Potter
<phil@...lpotter.co.uk>, Sabrina Dubroca <sd@...asysnail.net>
Subject: Re: [PATCH net] geneve: fix header validation in geneve[6]_xmit_skb
On Thu, 4 Apr 2024 13:11:26 +0000 Eric Dumazet wrote:
> syzbot is able to trigger an uninit-value in geneve_xmit() [1]
>
> Problem : While most ip tunnel helpers (like ip_tunnel_get_dsfield())
> uses skb_protocol(skb, true), pskb_inet_may_pull() is only using
> skb->protocol.
>
> If anything else than ETH_P_IPV6 or ETH_P_IP is found in skb->protocol,
> pskb_inet_may_pull() does nothing at all.
>
> If a vlan tag was provided by the caller (af_packet in the syzbot case),
> the network header might not point to the correct location, and skb
> linear part could be smaller than expected.
>
> Add skb_vlan_inet_prepare() to perform a complete mac validation.
>
> Use this in geneve for the moment, I suspect we need to adopt this
> more broadly.
Something is cause the ttl test do break:
# │ geneve │ 4 │ 4 │ inherit 0x3c │ inherit 8 │ false │./l2_tos_ttl_inherit.sh: line 350: printf: 0xeaECT0: invalid hex number
ok 1 selftests: net: l2_tos_ttl_inherit.sh # SKIP
https://netdev-3.bots.linux.dev/vmksft-net-dbg/results/537382/6-l2-tos-ttl-inherit-sh/stdout
Is is possibly this change?
Powered by blists - more mailing lists