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: <m1skkaox8h.fsf@fess.ebiederm.org>
Date:	Wed, 15 Apr 2009 06:35:58 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	Patrick McHardy <kaber@...sh.net>,
	Matias Zabaljauregui <zabaljauregui@...il.com>, odie@...aau.dk,
	Rusty Russell <rusty@...tcorp.com.au>, lguest@...abs.org,
	virtualization@...ts.osdl.org,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Christian Borntraeger <borntraeger@...ibm.com>
Subject: Re: [Lguest] [PATCH 4/5] lguest: use KVM hypercalls

Herbert Xu <herbert@...dor.apana.org.au> writes:

> On Wed, Apr 15, 2009 at 06:23:29AM -0700, Eric W. Biederman wrote:
>> 
>> There is a GIGANTIC reason to have the wait queue on tfile.
>> 
>> If you open a file, and do ip link del tapN you can still
>> be blocked waiting in poll.
>> 
>> The problem is specifically free_poll_entry, where we call
>> remove_wait_queue and fput without calling any file methods.
>> So all of this happens without struct tun_file's count being
>> elevated.  Which means tun_net_uninit can detach before we get
>> off of the stupid poll wait queue.
>
> What about taking a netdev refcount before calling poll_wait?

Because as far as I can tell we would just leak that refcount.

The poll code does not appear to call back into any of the file
methods when it frees itself from the wait queue.

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