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: <4630A783.4050200@hp.com>
Date:	Thu, 26 Apr 2007 09:22:11 -0400
From:	Vlad Yasevich <vladislav.yasevich@...com>
To:	David Miller <davem@...emloft.net>
Cc:	akpm@...ux-foundation.org, netdev@...r.kernel.org,
	bugme-daemon@...zilla.kernel.org, matthias.kaehlcke@...il.com,
	lksctp-developers@...ts.sourceforge.net
Subject: Re: [Bugme-new] [Bug 8342] New: sctp_getsockopt_local_addrs_old()
 calls copy_to_user() while a spinlock is held

David Miller wrote:
> From: Vlad Yasevich <vladislav.yasevich@...com>
> Date: Mon, 23 Apr 2007 13:43:35 -0400
> 
>> [PATCH] [SCTP] Fix sctp_getsockopt_local_addrs_old() to use local storage
>>
>> sctp_getsockopt_local_addrs_old() in net/sctp/socket.c calls copy_to_user()
>> while the spinlock addr_lock is held. this should not be done as copy_to_user()
>> might sleep. the call to sctp_copy_laddrs_to_user() while holding the lock is
>> also problematic as it calls copy_to_user()
>>
>> Signed-off-by: Vlad Yasevich <vladislav.yasevich@...com>
> 
> As Andrew Morton just noticed and fixed in -mm, you're passing
> in int pointers to arguments that should be size_t pointers,
> specifically for some of the calls to sctp_copy_laddrs().
> 
> Please fix this, and please start testing builds on 64-bit
> platforms (even if via cross compile) so that you can catch
> these as the warnings generated by the compiler on this one
> were obvious.
> 

Sorry... I built and tested it on ia64, but the warning scrolled off the page.

Here is an updated patch.  bytes_copied got turned into an int everywhere since that
is what the new API expects, so it should be enough for the old api as well.  This also
makes the code more consistent.

-vlad



View attachment "x" of type "text/plain" (7429 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ