linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] prctl: fix validation of an address
@ 2012-12-29 11:00 Andrey Vagin
  2012-12-30 22:03 ` Eric Paris
  0 siblings, 1 reply; 9+ messages in thread
From: Andrey Vagin @ 2012-12-29 11:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrey Vagin, Andrew Morton, Kees Cook, Cyrill Gorcunov,
	Serge Hallyn, Eric W. Biederman, Eric Paris, James Morris

The address should be bigger than dac_mmap_min_addr, because
a process with CAP_RAWIO can map a vma bellow mmap_min_addr.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
 kernel/sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index 265b376..e0e1bbd 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1868,7 +1868,7 @@ static int prctl_set_mm(int opt, unsigned long addr,
 	if (opt == PR_SET_MM_EXE_FILE)
 		return prctl_set_mm_exe_file(mm, (unsigned int)addr);
 
-	if (addr >= TASK_SIZE || addr < mmap_min_addr)
+	if (addr >= TASK_SIZE || addr < dac_mmap_min_addr)
 		return -EINVAL;
 
 	error = -EINVAL;
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-01  8:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-29 11:00 [PATCH] prctl: fix validation of an address Andrey Vagin
2012-12-30 22:03 ` Eric Paris
2012-12-31 10:14   ` Andrew Vagin
2012-12-31 14:27     ` Eric Paris
2012-12-31 15:13       ` Cyrill Gorcunov
2012-12-31 15:20         ` Eric Paris
2012-12-31 15:38           ` Cyrill Gorcunov
2012-12-31 21:12         ` Serge E. Hallyn
2013-01-01  8:26       ` Andrey Wagin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).