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] [day] [month] [year] [list]
Date:	Tue, 25 Sep 2012 00:53:18 +0400
From:	Cyrill Gorcunov <gorcunov@...nvz.org>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Mark Salter <msalter@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Russell King <rmk@....linux.org.uk>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Kees Cook <keescook@...omium.org>,
	linux-kernel@...r.kernel.org,
	Linux-Arch <linux-arch@...r.kernel.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Pavel Emelyanov <xemul@...allels.com>
Subject: Re: sys_kcmp

On Mon, Sep 24, 2012 at 01:44:47PM -0700, Eric W. Biederman wrote:
> Cyrill Gorcunov <gorcunov@...nvz.org> writes:
> 
> > On Mon, Sep 24, 2012 at 10:51:19PM +0400, Cyrill Gorcunov wrote:
> >> > I expect what you want is a call to access_ok, rather than hard coding
> >> > details about task layout here.  This test certainly looks wrong
> >> > for a 32bit process on a 64bit kernel. If I read your test right it
> >> > appears I can set values of say 0x100000000 on a 32bit process...
> >> > 
> >> > As for mmap_min_addr I would expect your find_vma check would make that
> >> > test unnecessary, simply by not finding a vma...
> >> 
> >> Good point, Eric, thanks! I'm cooking a new patch now.
> >
> > Btw, Eric, I somehow miss one bit -- how would you set this 0x100000000
> > if TASK_SIZE is a macro which does check for TIF_ADDR32 and sets limit
> > acordingly? What i'm missing?
> 
> How odd.  Last time I had looked TASK_SIZE was a simple constant.

Ah, I see.

> Still I wonder a little if all architectures currently run from 0 to
> TASK_SIZE, for address space available.  I seem to remember there have
> been some exceptions to that rule.  But I can't recall what they were.

Actually I;ve tuned up the code to use access_ok instead but now I'm trying
to fugure out situation if it can somehow affect c/r process (well, i've
ran all test cases we use for c/r and all are passed well, but still...).

Mark, after some more thinking, I agree that your proposal with min-address
should work better than mine explicit CONFIG_MMU. Could you please send
your patch for that? As to access_ok -- gimme some more time, i need to double
check everything and I'll patch the code on top of your patch a bit later, ok?
--
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