[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150806.215628.1038906181820631420.davem@davemloft.net>
Date: Thu, 06 Aug 2015 21:56:28 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: herbert@...dor.apana.org.au
Cc: bblanco@...mgrid.com, netdev@...r.kernel.org,
khlebnikov@...dex-team.ru
Subject: Re: net: Fix skb_set_peeked use-after-free bug
From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Tue, 4 Aug 2015 15:42:47 +0800
> The commit 738ac1ebb96d02e0d23bc320302a6ea94c612dec ("net: Clone
> skb before setting peeked flag") introduced a use-after-free bug
> in skb_recv_datagram. This is because skb_set_peeked may create
> a new skb and free the existing one. As it stands the caller will
> continue to use the old freed skb.
>
> This patch fixes it by making skb_set_peeked return the new skb
> (or the old one if unchanged).
>
> Fixes: 738ac1ebb96d ("net: Clone skb before setting peeked flag")
> Reported-by: Brenden Blanco <bblanco@...mgrid.com>
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
Applied, and since the commit this is fixing is queued up for -stable
I'll of course queue this up too.
--
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