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: <47F2A226.60708@cosmosbay.com>
Date:	Tue, 01 Apr 2008 22:59:18 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Evgeniy Polyakov <johnpol@....mipt.ru>
CC:	David Miller <davem@...emloft.net>, axboe@...nel.dk,
	netdev@...r.kernel.org
Subject: Re: Fix for the fundamental network/block layer race in sendfile().

Evgeniy Polyakov a écrit :
> On Tue, Apr 01, 2008 at 09:21:19PM +0200, Eric Dumazet (dada1@...mosbay.com) wrote:
>> I see no socket locking, so multiple threads could use sendfile() & 
>> sendmsg() on same socket, and crash kernel...
> 
> How?
> Those who use sendfile() automatically install page->lru.prev which is
> checked in release path, only those with given value will be processed
> as spliced (i.e. new callback).
> 
> It is safe to install new callback on skbs which were not spliced, since
> for that skbs it will be pure sock_wfree().
> 

first thread is doing its sendfile, and clears the bit while second thread

just entered sendfile() too, just after setting the bit and calling

do_splice_direct()

skb_set_owner_w() see the bit cleared, so install normal sock_wfree destructor 
instead of sh_user_data.

crash or leak god_bless_us, you chose :)

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