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: <AANLkTi=R_ZsYgsYd7EkxHRFTKjtLyLQAOYay2nBV=0bK@mail.gmail.com>
Date:	Mon, 20 Dec 2010 17:11:45 +0800
From:	Changli Gao <xiaosuo@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Paweł Staszewski <pstaszewski@...are.pl>,
	"David S. Miller" <davem@...emloft.net>,
	Jarek Poplawski <jarkao2@...il.com>,
	Linux Network Development list <netdev@...r.kernel.org>
Subject: Re: Kernel panic eth2 mirred redirect to ifb0

On Mon, Dec 20, 2010 at 5:08 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Le lundi 20 décembre 2010 à 16:56 +0800, Changli Gao a écrit :
>
> This patch cant be right as is.
>
>        if (skb_is_gso(skb)) {
> +               if (skb_shared(skb)) {
> +                       struct sk_buff *nskb;
> +
> +                       nskb = skb_clone(skb, GFP_ATOMIC);
> +                       if (!nskb)
> +                               return -ENOMEM;
> +                       kfree_skb(skb); // HERE
> +                       skb = nskb;
> +               }
>
> You free original skb, while caller might dereference it later.
> So you must pass cloned skb back to caller.
>
> (line 6393 :)
>  count = ixgbe_tx_map(adapter, tx_ring, skb, tx_flags, first);
>
>

Yes, you are right. I just wonder where shared skbs are allowed. Is
there any rule?

-- 
Regards,
Changli Gao(xiaosuo@...il.com)
--
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