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]
Date: Tue, 11 Jul 2023 11:04:05 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: Maciej Żenczykowski <maze@...gle.com>, Maciej
 Żenczykowski <zenczykowski@...il.com>, "Linux Network
 Development Mailing List" <netdev@...r.kernel.org>, Benedict Wong
	<benedictwong@...gle.com>, Lorenzo Colitti <lorenzo@...gle.com>, Yan Yan
	<evitayan@...gle.com>
Subject: Re: [PATCH] xfrm: Silence warnings triggerable by bad packets

On Tue, Jul 04, 2023 at 08:53:49AM +0800, Herbert Xu wrote:
> On Fri, Jun 30, 2023 at 08:37:58AM -0700, Maciej Żenczykowski wrote:
> > Steffan, this isn't of course a patch meant for inclusion, instead just a WARN_ON hit report.
> > The patch is simply what prints the following extra info:
> > 
> > xfrm_prepare_input: XFRM_MODE_SKB_CB(skb)->protocol: 17
> > xfrm_inner_mode_encap_remove: x->props.mode: 1 XFRM_MODE_SKB_SB(skb)->protocol:17
> > 
> > (note: XFRM_MODE_TUNNEL=1 IPPROTO_UDP=17)
> 
> Thanks for the report.  This patch should fix the warnings:
> 
> ---8<---
> After the elimination of inner modes, a couple of warnings that
> were previously unreachable can now be triggered by malformed
> inbound packets.
> 
> Fix this by:
> 
> 1. Moving the setting of skb->protocol into the decap functions.
> 2. Returning -EINVAL when unexpected protocol is seen.
> 
> Reported-by: Maciej Żenczykowski<maze@...gle.com>
> Fixes: 5f24f41e8ea6 ("xfrm: Remove inner/outer modes from input path")
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>

Applied, thanks a lot Herbert!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ