[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20120307212221.GD6215@moon>
Date: Thu, 8 Mar 2012 01:22:21 +0400
From: Cyrill Gorcunov <gorcunov@...nvz.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Michael Kerrisk <mtk.manpages@...il.com>,
Kees Cook <keescook@...omium.org>,
Pavel Emelyanov <xemul@...allels.com>,
Tejun Heo <tj@...nel.org>, Oleg Nesterov <oleg@...hat.com>,
Paul Bolle <pebolle@...cali.nl>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH -mm] prctl: Use CAP_SYS_RESOURCE for PR_SET_MM option
CAP_SYS_ADMIN is already overloaded left and right,
so to have more fine-grained access control use
CAP_SYS_RESOURCE here.
The CAP_SYS_RESOUCE is chosen because this prctl
option allows a current process to adjust some
fields of memory map descriptor which rather
represents what the process owns: pointers to
code, data, stack segments, command line,
auxiliary vector data and etc.
Suggested-by: Michael Kerrisk <mtk.manpages@...il.com>
Acked-by: Kees Cook <keescook@...omium.org>
Acked-by: Michael Kerrisk <mtk.manpages@...il.com>
CC: Andrew Morton <akpm@...ux-foundation.org>
CC: Pavel Emelyanov <xemul@...allels.com>
CC: Tejun Heo <tj@...nel.org>
CC: Oleg Nesterov <oleg@...hat.com>
CC: Paul Bolle <pebolle@...cali.nl>
CC: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
---
Typo is fixed.
kernel/sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.git/kernel/sys.c
===================================================================
--- linux-2.6.git.orig/kernel/sys.c
+++ linux-2.6.git/kernel/sys.c
@@ -1712,7 +1712,7 @@ static int prctl_set_mm(int opt, unsigne
if (arg5 || (arg4 && opt != PR_SET_MM_AUXV))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
+ if (!capable(CAP_SYS_RESOURCE))
return -EPERM;
if (addr >= TASK_SIZE)
--
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