[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160601042719.GA31691@gondor.apana.org.au>
Date: Wed, 1 Jun 2016 12:27:19 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: David Miller <davem@...emloft.net>,
Lennert Buytenhek <buytenh@...tstofly.org>,
Patrick McHardy <kaber@...sh.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Jiri Pirko <jpirko@...hat.com>
Subject: Re: [v2 PATCH 1/2] macvlan: Fix potential use-after free for
broadcasts
On Tue, May 31, 2016 at 09:19:37PM -0700, Cong Wang wrote:
>
> Hmm, why could this happen? The upper device should be linked
> with the lower device, where a refcount is already held.
> Also, the work is cancelled in ->uninit().
Of course it can happen. We are talking about the source macvlan
device that we just looked up using the Ethernet address. That
device has nothing to do with the packet now so it may be deleted
at any time.
We do flush the work but only when the all macvlan devices on a
port have been deleted. Perhaps you're confusing the source
device with vlan->lowerdev which is confusingly the actual
hardware device?
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists