lkml.org 
[lkml]   [2004]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fix must_not_trace_exec() test
* 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.031 / U:3.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site