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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jKnfOsXGTx8QbKCCH9C9c+szFwi5oA1R99pjCue9kfpWg@mail.gmail.com>
Date:	Tue, 17 Apr 2012 11:22:06 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Cyrill Gorcunov <gorcunov@...nvz.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Tejun Heo <tj@...nel.org>,
	Serge Hallyn <serge.hallyn@...onical.com>,
	Pavel Emelyanov <xemul@...allels.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [PATCH c/r -mm] c/r: prctl: Simplify PR_SET_MM on mm::code/data assignment

On Mon, Apr 16, 2012 at 3:55 PM, Cyrill Gorcunov <gorcunov@...nvz.org> wrote:
> The mm::start_code, end_code, start_data, end_data members
> are set during startup of executable file and are not changed
> after.
>
> But the program itself might map new executable or/and data areas in
> time so the original values written into mm fields mentioned above
> might not have correspond VMA area at all, thus if one try to
> use this prctl codes without underlied VMA, the error will be
> returned.
>
> Drop this requirement. This shrinks the code and eliminates
> redundant calls to vma_flags_mismatch. The worst thing one can
> do (if say to write some bad values here) -- the weird results
> will be shown in /proc/$pid/statm or in /proc/pid/stat.
>
> Still, assignement of data on stack (such as command line and
> environment variables) requires the underlied VMA to exist.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>

Since this is CAP_SYS_RESOURCE, and mmap_min_addr is CAP_SYS_RAWIO,
how about a lower-bounds check against mmap_min_addr? (We're already
doing the TASK_SIZE upper check, so this additional sanity checking
seems reasonable to me.)

-Kees

-- 
Kees Cook
ChromeOS Security
--
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