From: Chris Wright <chrisw@sous-sol.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, Ram Gupta <ram.gupta5@gmail.com>
Subject: [PATCH 2/2] make cap_ptrace enforce PTRACE_TRACME checks
Date: Thu, 9 Mar 2006 03:23:24 -0800 [thread overview]
Message-ID: <20060309112324.GB3883@sorel.sous-sol.org> (raw)
In-Reply-To: <20060309111651.GA3883@sorel.sous-sol.org>
PTRACE_TRACEME doesn't have proper capabilities validation when
parent is less privileged than child. Issue pointed out by
Ram Gupta <ram.gupta5@gmail.com>.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Ram Gupta <ram.gupta5@gmail.com>
---
Note: I haven't identified a strong security issue, and it's a small
ABI change that could break apps that rely on existing behaviour (which
allows parent that is less privileged than child to ptrace when child
does PTRACE_TRACEME).
security/commoncap.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- linus-2.6.orig/security/commoncap.c
+++ linus-2.6/security/commoncap.c
@@ -60,8 +60,8 @@ int cap_settime(struct timespec *ts, str
int cap_ptrace (struct task_struct *parent, struct task_struct *child)
{
/* Derived from arch/i386/kernel/ptrace.c:sys_ptrace. */
- if (!cap_issubset (child->cap_permitted, current->cap_permitted) &&
- !capable(CAP_SYS_PTRACE))
+ if (!cap_issubset(child->cap_permitted, parent->cap_permitted) &&
+ !__capable(parent, CAP_SYS_PTRACE))
return -EPERM;
return 0;
}
prev parent reply other threads:[~2006-03-09 11:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 11:16 [PATCH 1/2] refactor capable() to one implementation, add __capable() helper Chris Wright
2006-03-09 11:23 ` Chris Wright [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060309112324.GB3883@sorel.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ram.gupta5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®