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: <ZhBq7fe_pN90gJkX@hog>
Date: Fri, 5 Apr 2024 23:19:41 +0200
From: Sabrina Dubroca <sd@...asysnail.net>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, eric.dumazet@...il.com,
	syzbot+9ee20ec1de7b3168db09@...kaller.appspotmail.com,
	Phillip Potter <phil@...lpotter.co.uk>
Subject: Re: [PATCH v4 net] geneve: fix header validation in
 geneve[6]_xmit_skb

2024-04-05, 10:30:34 +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.
> 
> v4 - Jakub reported v3 broke l2_tos_ttl_inherit.sh selftest
>    - Only call __vlan_get_protocol() for vlan types.
> Link: https://lore.kernel.org/netdev/20240404100035.3270a7d5@kernel.org/
> 
> v2,v3 - Addressed Sabrina comments on v1 and v2
> Link: https://lore.kernel.org/netdev/Zg1l9L2BNoZWZDZG@hog/
> 
...
> 
> Fixes: d13f048dd40e ("net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb")
> Reported-by: syzbot+9ee20ec1de7b3168db09@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/netdev/000000000000d19c3a06152f9ee4@google.com/
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Phillip Potter <phil@...lpotter.co.uk>
> Cc: Sabrina Dubroca <sd@...asysnail.net>

Reviewed-by: Sabrina Dubroca <sd@...asysnail.net>

Thanks Eric.

-- 
Sabrina


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ