Bug 189439 - CVE-2006-1864 smbfs chroot issue
CVE-2006-1864 smbfs chroot issue
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel (Show other bugs)
2.1
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Don Howard
Brian Brock
impact=moderate,source=secalert,repor...
: Security
Depends On:
Blocks: 143573
  Show dependency treegraph
 
Reported: 2006-04-19 18:53 EDT by Marcel Holtmann
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2006-0580
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-13 07:55:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marcel Holtmann 2006-04-19 18:53:32 EDT
When doing a chroot inside of a smb-mounted filesystem (smbfs), it appears that
you can break out of it using "cd ..\\" (2 backslashes).

[root@server me]# pwd
/path/to/my/dir
[root@server me]# ls
bin  chroot  etc  lib
[root@server me]# chroot .
bash-2.05a# pwd
/
bash-2.05a# ls
bin  chroot  etc  lib
bash-2.05a# cd ..\\
bash-2.05a# pwd
/..\
bash-2.05a# ls
<list of files from parent>
Comment 5 Mike Gahagan 2006-07-11 17:51:43 EDT
With e.61, I can reproduce the strange looking current working directory, but I
can't seem to break out of the jail. I'll see what happens with the new kernel.


//127.0.0.1/tmp       32897536   6115840  26781696  19% /mnt/cdrom
.qa.[root@ia64-21as-bos cdrom]# cp -a /bin /etc/ /lib /tmp
.qa.[root@ia64-21as-bos cdrom]# ll
total 49
drwxr-xr-x    1 root     root        16384 Jun  4 02:36 bin
drwxr-xr-x    1 root     root        16384 Jul 11 17:51 etc
drwxr-xr-x    1 root     root        16384 Jun  4 02:34 lib
-rwxr-xr-x    1 root     root          564 Jul 10 09:54 phptest1
-rwxr-xr-x    1 root     root            0 Jul 10 09:48 RHTS-CVE-2006-1494pZk24X
.qa.[root@ia64-21as-bos cdrom]# chroot .

bash-2.05#
bash-2.05# ls
RHTS-CVE-2006-1494pZk24X  bin  etc  lib  phptest1
bash-2.05# pwd
/..\
bash-2.05# ls
RHTS-CVE-2006-1494pZk24X  bin  etc  lib  phptest1
bash-2.05# ls /
RHTS-CVE-2006-1494pZk24X  bin  etc  lib  phptest1
bash-2.05# cd ..\\
bash-2.05# cd ..\\
bash-2.05# pwd
/..\/..\/..\
bash-2.05# ls
RHTS-CVE-2006-1494pZk24X  bin  etc  lib  phptest1
bash-2.05# cd ..\\
bash-2.05# pwd
/..\/..\/..\/..\
bash-2.05# uname -a
Linux ia64-21as-bos.lab.boston.redhat.com 2.4.18-e.61smp #1 SMP Thu Jan 19
19:18:08 EST 2006 ia64 unknown
Comment 6 Mike Gahagan 2006-07-11 18:28:08 EDT
While I never got out of the jail with the older kernel, I can see that the
newer kernel is definately throwing out an error like it should.. marking verified.

.qa.[root@ia64-21as-bos test]# chroot .
bash-2.05# ls
RHTS-CVE-2006-1494pZk24X  bin  etc  lib  phptest1
bash-2.05# cd ..\\
bash: cd: ..\: Invalid argument
bash-2.05# cd ..\\
bash: cd: ..\: Invalid argument
bash-2.05# pwd
/
bash-2.05# uname -a
Linux ia64-21as-bos.lab.boston.redhat.com 2.4.18-e.62smp #1 SMP Fri May 26
18:45:16 EDT 2006 ia64 unknown
Comment 8 Red Hat Bugzilla 2006-07-13 07:55:22 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2006-0580.html

Note You need to log in before you can comment on or make changes to this bug.