Re: [Security-Discuss] Mount issues in LE2005-Club - Security Issue

Stew Benedict <sbenedict-4qZELD6FgxhWk0Htik3J/[email protected]> Mon, 29 Aug 2005 15:00:09 -0400 (EDT)
Newsgroups gmane.linux.mandrake.security.general
Message-ID <[email protected]>
I'm not seeing the problem:

[root@presario30 ~]# cat /proc/version 
Linux version 2.6.11-12mdk (qateam-x6Fv9fcoW1bipkQsPoWDGFaTQe2KTcn/@public.gmane.org) (gcc version 
3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)) #1 Mon Jun 27 23:18:37 MDT 2005
[root@presario30 ~]# rpm -q mount
mount-2.12a-12mdk
[root@presario30 ~]# cat /etc/mandrake-release 
Mandrakelinux release 10.2 (Limited Edition 2005) for i586

[root@presario30 ~]# grep tmp /etc/fstab
/dev/hda21 /tmp ext3 nosuid,noexec,nodev 1 2
[root@presario30 ~]# mount | grep tmp
/dev/hda21 on /tmp type ext3 (rw,noexec,nosuid,nodev)

[root@presario30 ~]# cp /bin/ls /tmp
[root@presario30 ~]# /tmp/ls
-bash: /tmp/ls: Permission denied

[root@presario30 ~]# ls -l /usr/bin/sudo
---s--x--x  2 root root 101748 Jun 21 12:29 /usr/bin/sudo*
[root@presario30 ~]# cp -av /usr/bin/sudo /tmp
`/usr/bin/sudo' -> `/tmp/sudo'
[root@presario30 ~]# ls -l /tmp/sudo
---s--x--x  1 root root 101748 Jun 21 12:29 /tmp/sudo*
[root@presario30 ~]# /tmp/sudo 
-bash: /tmp/sudo: Permission denied

[root@presario30 ~]# cd /tmp
[root@presario30 tmp]# mknod hdc b 22 0
[root@presario30 tmp]# mount hdc /mnt/cdrom
mount: block device hdc is write-protected, mounting read-only
mount: cannot mount block device hdc read-only

If I remove the "nodev" and remount:

[root@presario30 tmp]# grep tmp /etc/fstab
/dev/hda21 /tmp ext3 nosuid,noexec 1 2

[root@presario30 tmp]# mount | grep tmp
/dev/hda21 on /tmp type ext3 (rw,noexec,nosuid)

[root@presario30 ~]# mount -oremount /tmp
[root@presario30 ~]# cd /tmp
[root@presario30 tmp]# mount hdc /mnt/cdrom
mount: block device hdc is write-protected, mounting read-only


-- 
Stew Benedict
Mandriva
Mandrakesoft becomes Mandriva
message.footer (text/plain, 232 B)
____________________________________________________
Want to buy your Pack or Services from Mandriva? 
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________