Re: Why 'mount' utils nees a setuid bit?



In article <aec45dd5-0f90-4eaa-b08b-9e692fcd2b76@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
xi4oyu <Evil.xi4oyu@xxxxxxxxx> writes:
well , there exists some differents to mount a filesytem if you are a
normal user.
Even if root has added user options in /etc/fstab , user then can
mount the filesytem . But it seems that the setuid program in the
newly mounted FS doesn't a truley setuid program , Even you use ls -
l ,the result like :

[test@localhost mnt]$ ls -l
total 52
-rwsr-sr-x 1 root root 38468 Apr 17 15:47 chmod
drwx------ 2 root root 12288 Apr 17 15:42 lost+found

but the chmod can't turely take efforts on the root's file :p

The OS must be designed to take care of this secure issue.

That's a different issue than why mount needs setuid.

It's reasonably common to ignore setuid on user-mounted
file systems and/or NFS mounted systems. It's a security
issue. setuid would allow anybody who could do a user-mount
to take over the system. (All they would need is a setuid script
that started a shell. Poof, you are root.)

--
These are my opinions, not necessarily my employer's. I hate spam.

.



Relevant Pages

  • Flaws in recent Linux kernels
    ... The first vulnerability results in local DoS. ... to the ptrace bug mentioned. ... Root compromise by ptrace ... setuid root and world-executable. ...
    (Bugtraq)
  • Re: Is screen really secure?
    ... > "do not run a daemon as root as long isn't really require it".. ... Screen is setuid root by default. ... or you can make utmp/wtmp/lastlog group "utmp" ... Here's what I worry about. ...
    (FreeBSD-Security)
  • Re: File Permissions
    ... > not the root group. ... I believe it's called a setuid bit and you do ... to use this as a way to force a script/program to be run as its owner. ... in some setups normal users ...
    (comp.os.linux)
  • Re: tracing function calls
    ... AFAIR the result when trying without root privileges depends ... execute it anyway but ignore the setuid bit. ... port number, but connecting to a port doesn't require any ...
    (comp.os.linux.development.apps)
  • DMA[2005-0501a] - ARPUS/Ce setuid buffer overflow and file overwrite
    ... Ce/Ceterm aka. ARPUS/Ce is an integrated ascii text editor and X based terminal emulator ... In the past machines other than SunOS and Apollo had to have ceterm installed as setuid root. ...
    (Bugtraq)