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: <1449181633.25029.21.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Thu, 03 Dec 2015 14:27:13 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>,
	Steffen Klassert <steffen.klassert@...unet.com>
Cc:	davej@...emonkey.org.uk, netdev@...r.kernel.org
Subject: Re: 4.4-rc2 xfrm_lookup kasan trace

On Thu, 2015-12-03 at 09:09 -0800, Eric Dumazet wrote:
> On Thu, 2015-12-03 at 11:59 -0500, David Miller wrote:
> > From: Eric Dumazet <eric.dumazet@...il.com>
> > Date: Mon, 30 Nov 2015 17:22:11 -0800
> > 
> > > @@ -2198,6 +2198,7 @@ struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig,
> > >  	xdst = NULL;
> > >  	route = NULL;
> > >  
> > > +	sk = sk_to_full_sk((struct sock *)sk);
> > 
> > The war against const...
> > 
> > I know this is the only instance where const is input, but you may want to
> > consider adding the const verion of the helper anyways to avoid ugly casts
> > like this.
> 
> Agreed, it is sad C language has no way to 'propagate' the const..

I did not send an official patch because we have a problem with xfrm
and lockless listeners anyway.

Namely, it looks like sk->sk_policy[] should get RCU protection, since
another cpu could change sk->sk_policy[] concurrently on a listener,
while a cpu is processing a SYN packet (without holding socket lock)

Oh well.





--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ