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>] [day] [month] [year] [list]
Message-id: <4681A248.6070109@shaw.ca>
Date:	Tue, 26 Jun 2007 17:33:28 -0600
From:	Robert Hancock <hancockr@...w.ca>
To:	David Woodhouse <dwmw2@...radead.org>
Cc:	Rodolfo Giometti <giometti@...eenne.com>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] LinuxPPS (with new syscalls API)

David Woodhouse wrote:
> On Tue, 2007-06-26 at 19:06 +0200, Rodolfo Giometti wrote:
>> On Tue, Jun 26, 2007 at 11:57:07AM +0100, David Woodhouse wrote:
>>> Your syscalls blindly dereference userspace pointers instead of using
>>> copy_{to,from} user.
>> I use access_ok() to test userspace addresses. It should be ok,
>> shouldn't it?
> 
> No; it's racy. You must use copy_from_user() and copy_to_user().

Not only is it racy, but it doesn't even do all of the checks that 
copy_to/from_user does. access_ok only validates that the region given 
is potentially valid, not that it actually is. Using access_ok only 
allows you to use __copy_to/from_user instead, which skips the same 
checks that access_ok does - not worth it unless you do repeated copies 
to/from the same region of memory.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@...pamshaw.ca
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ