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:   Wed, 27 Mar 2019 09:23:59 +0100
From:   Steffen Klassert <steffen.klassert@...unet.com>
To:     Herbert Xu <herbert@...dor.apana.org.au>
CC:     Cong Wang <xiyou.wangcong@...il.com>, <netdev@...r.kernel.org>,
        <syzbot+0bf0519d6e0de15914fe@...kaller.appspotmail.com>
Subject: Re: [Patch net v2] xfrm: clean up xfrm protocol checks

On Mon, Mar 25, 2019 at 06:42:58PM +0800, Herbert Xu wrote:
> On Fri, Mar 22, 2019 at 04:26:19PM -0700, Cong Wang wrote:
> > In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
> > I introduced a check for xfrm protocol, but according to Herbert
> > IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
> > it should be removed from validate_tmpl().
> > 
> > And, IPSEC_PROTO_ANY is expected to only match 3 IPSec-specific
> > protocols, this is why xfrm_state_flush() could still miss
> > IPPROTO_ROUTING, which leads that those entries are left in
> > net->xfrm.state_all before exit net. Fix this by replacing
> > IPSEC_PROTO_ANY with zero.
> > 
> > This patch also extracts the check from validate_tmpl() to
> > xfrm_id_proto_valid() and uses it in parse_ipsecrequest().
> > With this, no other protocols should be added into xfrm.
> > 
> > Fixes: 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
> > Reported-by: syzbot+0bf0519d6e0de15914fe@...kaller.appspotmail.com
> > Cc: Steffen Klassert <steffen.klassert@...unet.com>
> > Cc: Herbert Xu <herbert@...dor.apana.org.au>
> > Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> > ---
> >  include/net/xfrm.h      | 17 +++++++++++++++++
> >  net/ipv6/xfrm6_tunnel.c |  2 +-
> >  net/key/af_key.c        |  4 +++-
> >  net/xfrm/xfrm_state.c   |  2 +-
> >  net/xfrm/xfrm_user.c    | 14 +-------------
> >  5 files changed, 23 insertions(+), 16 deletions(-)
> 
> Acked-by: Herbert Xu <herbert@...dor.apana.org.au>
> 

Patch applied, thanks everyone!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ