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: <20090107122407.GC25673@gondor.apana.org.au>
Date:	Wed, 7 Jan 2009 23:24:07 +1100
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Willy Tarreau <w@....eu>
Cc:	Jarek Poplawski <jarkao2@...il.com>,
	Jens Axboe <jens.axboe@...cle.com>,
	Changli Gao <xiaosuo@...il.com>,
	Evgeniy Polyakov <zbr@...emap.net>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: Data corruption issue with splice() on 2.6.27.10

On Wed, Jan 07, 2009 at 01:22:05PM +0100, Willy Tarreau wrote:
>
> > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> > index 5110b35..4c080cd 100644
> > --- a/net/core/skbuff.c
> > +++ b/net/core/skbuff.c
> > @@ -73,17 +73,13 @@ static struct kmem_cache *skbuff_fclone_cache __read_mostly;
> >  static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
> >  				  struct pipe_buffer *buf)
> >  {
> > -	struct sk_buff *skb = (struct sk_buff *) buf->private;
> > -
> > -	kfree_skb(skb);
> > +	put_page(buf->page);
> >  }
> >  
> >  static void sock_pipe_buf_get(struct pipe_inode_info *pipe,
> >  				struct pipe_buffer *buf)
> >  {
> > -	struct sk_buff *skb = (struct sk_buff *) buf->private;
> > -
> > -	skb_get(skb);
> > +	get_page(buf->page);
> >  }

Well this patch can only make it worse because not only are you
still ref counting skb->head with get_page, but you've also
completely removed the skb ref count which means that the corruption
can only occur sooner.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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