public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Andy Lutomirski <luto@myrealbox.com>
Cc: Olaf Dietsche <olaf+list.linux-kernel@olafdietsche.de>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: fix must_not_trace_exec() test
Date: Mon, 12 Apr 2004 15:02:52 -0700	[thread overview]
Message-ID: <20040412150252.D21045@build.pdx.osdl.net> (raw)
In-Reply-To: <407AA51F.5020205@myrealbox.com>; from luto@myrealbox.com on Mon, Apr 12, 2004 at 07:18:07AM -0700

* Andy Lutomirski (luto@myrealbox.com) wrote:
> Olaf Dietsche wrote:
> > 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.
> 
> I assumed that the test was to check if the caller is a thread, but that
> sounds odd -- wouldn't it stop being a thread after the exec anyway?
> Maybe that part happens after compute_creds, so this prevents a race?
> Although I don't see how it could be triggered if the thread never
> entered usermode before getting a new fs/files/sighand.

There's no requirement for CLONE_THREAD when using at least CLONE_FS
and CLONE_FILES.  And all of the latter are inherited across execve().
These tests are needed to keep a malicious program from controlling the
setuid program in ways other than ptrace.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

  reply	other threads:[~2004-04-12 22:02 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 ` fix must_not_trace_exec() test (was: 2.6.5-mm4) Olaf Dietsche
2004-04-12 14:18   ` fix must_not_trace_exec() test Andy Lutomirski
2004-04-12 22:02     ` Chris Wright [this message]
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=20040412150252.D21045@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@myrealbox.com \
    --cc=olaf+list.linux-kernel@olafdietsche.de \
    /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