From: Olaf Dietsche <olaf+list.linux-kernel@olafdietsche.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Andy Lutomirski <luto@myrealbox.com>, linux-kernel@vger.kernel.org
Subject: Re: fix must_not_trace_exec() test (was: 2.6.5-mm4)
Date: Mon, 12 Apr 2004 11:44:51 +0200 [thread overview]
Message-ID: <878yh1y1gs.fsf@goat.bogus.local> (raw)
In-Reply-To: <20040410200551.31866667.akpm@osdl.org>
Andrew Morton <akpm@osdl.org> writes:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5/2.6.5-mm4/
>
> +compute-creds-race-fix.patch
> +compute-creds-race-fix-fix.patch
>
> Fix possible race in permission calculation across exec()
this is a small fix for the modified must_not_trace_exec() test.
I have tested neither the compute-creds-race-fix nor my patch.
It is on top of 2.6.5 + compute-creds-race-fix.patch +
compute-creds-race-fix-fix.patch.
Although, I'd rather not lump together unrelated tests without
renaming must_not_trace_exec(). Btw, can someone enlighten me what
this atomic_read() test is all about.
Regards, Olaf.
diff -urN a/security/commoncap.c b/security/commoncap.c
--- a/security/commoncap.c Mon Apr 12 10:38:17 2004
+++ b/security/commoncap.c Mon Apr 12 11:10:38 2004
@@ -118,9 +118,9 @@
static inline int must_not_trace_exec (struct task_struct *p)
{
return ((p->ptrace & PT_PTRACED) && !(p->ptrace & PT_PTRACE_CAP))
- || atomic_read(¤t->fs->count) > 1
- || atomic_read(¤t->files->count) > 1
- || atomic_read(¤t->sighand->count) > 1;
+ || atomic_read(&p->fs->count) > 1
+ || atomic_read(&p->files->count) > 1
+ || atomic_read(&p->sighand->count) > 1;
}
void cap_bprm_apply_creds (struct linux_binprm *bprm)
diff -urN a/security/dummy.c b/security/dummy.c
--- a/security/dummy.c Mon Apr 12 10:38:17 2004
+++ b/security/dummy.c Mon Apr 12 11:10:50 2004
@@ -174,9 +174,9 @@
static inline int must_not_trace_exec (struct task_struct *p)
{
return ((p->ptrace & PT_PTRACED) && !(p->ptrace & PT_PTRACE_CAP))
- || atomic_read(¤t->fs->count) > 1
- || atomic_read(¤t->files->count) > 1
- || atomic_read(¤t->sighand->count) > 1;
+ || atomic_read(&p->fs->count) > 1
+ || atomic_read(&p->files->count) > 1
+ || atomic_read(&p->sighand->count) > 1;
}
static void dummy_bprm_apply_creds (struct linux_binprm *bprm)
next prev parent reply other threads:[~2004-04-12 9:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-11 3:05 2.6.5-mm4 Andrew Morton
2004-04-12 6:46 ` 2.6.5-mm4 Paul P Komkoff Jr
2004-04-12 7:42 ` 2.6.5-mm4 Andrew Morton
2004-04-12 8:22 ` 2.6.5-mm4 Paul P Komkoff Jr
2004-04-12 8:28 ` 2.6.5-mm4 Andrew Morton
2004-04-12 9:10 ` 2.6.5-mm4 Paul P Komkoff Jr
2004-04-12 9:44 ` Olaf Dietsche [this message]
2004-04-12 14:18 ` fix must_not_trace_exec() test Andy Lutomirski
2004-04-12 22:02 ` Chris Wright
2004-04-12 10:19 ` 2.6.5-mm4 (hci_usb module unloading oops) Martin Hermanowski
2004-04-12 22:03 ` Greg KH
2004-04-12 22:36 ` Marcel Holtmann
2004-04-12 22:42 ` Greg KH
2004-04-12 22:57 ` Marcel Holtmann
2004-04-19 20:29 ` Martin Hermanowski
2004-04-12 12:24 ` [PATCH] change audit_log_format() -> printk() (was: 2.6.5-mm4) Olaf Dietsche
2004-04-12 17:06 ` 2.6.5-mm4 (compile stats) John Cherry
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=878yh1y1gs.fsf@goat.bogus.local \
--to=olaf+list.linux-kernel@olafdietsche.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@myrealbox.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®