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: <200805282309.13628.opurdila@ixiacom.com>
Date:	Wed, 28 May 2008 23:09:13 +0300
From:	Octavian Purdila <opurdila@...acom.com>
To:	Jarek Poplawski <jarkao2@...il.com>
Cc:	Evgeniy Polyakov <johnpol@....mipt.ru>,
	Ben Hutchings <bhutchings@...arflare.com>,
	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: race in skb_splice_bits?

On Wednesday 28 May 2008, Jarek Poplawski wrote:

> >> We queue data under the lock and clone appropriate skb (and then grab it
> >> multiple times), so even it will be dropped, its data will not freed,
> >> and thus we will be able to read it. Or you are talking about different
> >> skbs?
> >
> > You are right, I forgot about the clone.
>
> Probably I miss something, but how does it help when tcp_collapse()
> uses __kfree_skb()?
>

__kfree_skb() -> skb_release_all() -> skb_release_data():

static void skb_release_data(struct sk_buff *skb)
{
        if (!skb->cloned ||
<snip>
                kfree(skb->head);

Since we clone the skb in skb_splice_bits() the skb's data will only be freed 
when the last clone is deleted.

tavi
--
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