netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com,
	syzbot+9ee20ec1de7b3168db09@syzkaller.appspotmail.com,
	Phillip Potter <phil@philpotter.co.uk>,
	Sabrina Dubroca <sd@queasysnail.net>
Subject: Re: [PATCH net] geneve: fix header validation in geneve[6]_xmit_skb
Date: Thu, 4 Apr 2024 10:00:35 -0700	[thread overview]
Message-ID: <20240404100035.3270a7d5@kernel.org> (raw)
In-Reply-To: <20240404131126.2534400-1-edumazet@google.com>

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?

  reply	other threads:[~2024-04-04 17:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 13:11 [PATCH net] geneve: fix header validation in geneve[6]_xmit_skb Eric Dumazet
2024-04-04 17:00 ` Jakub Kicinski [this message]
2024-04-04 17:09   ` Eric Dumazet
2024-04-04 17:47     ` Eric Dumazet
2024-04-04 18:13       ` Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2024-04-03 11:38 Eric Dumazet
2024-04-03 14:21 ` Sabrina Dubroca
2024-04-03 14:25   ` Eric Dumazet
2024-04-03 14:55     ` Sabrina Dubroca
2024-04-03 14:59       ` Eric Dumazet
2024-04-03 16:04         ` Sabrina Dubroca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240404100035.3270a7d5@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=phil@philpotter.co.uk \
    --cc=sd@queasysnail.net \
    --cc=syzbot+9ee20ec1de7b3168db09@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).