lkml.org 
[lkml]   [1999]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Capabilities done right [diff against 2.3.1]
Hi!

> > If so, you might as well start by allowing setuid shell scripts.
> > That was a massive security hole last I heard.
>
> I don't think you've quite got the idea of capabilities yet. If you
> did you wouldn't think that a shell script with capabilities is any
> worse or better than an ELF program with capabilities. In fact,

Yes, it is. Think about: (let ping be shell script)

# cp -a /bin/ping /tmp
user1$ ls -al /tmp/ping
rwsr-xr-x ping
user1$ creates evil script to echo "user1evil:0:" into /etc/passwd
user1$ /tmp/ping &
kernel now starts executing /bin/bash /tmp/ping
but
user1$ mv -f /tmp/evil_script /tmp/ping
/tmp/ping had suid, /tmp/evil_script does not have suid, but shell
being launched already _runs_ suid
user1$ su user1evil
user1evil#

DO you see my point? You need to pass open fd of program being
executed to interpretter if you want suid scripts to work. This
vulnerability does _not_ exist with elf files.

Pavel

--
The best software in life is free (not shareware)! Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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