Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 54754
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Matthias Geerdsen <vorlon@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
mk_rssh_chroot_jail.sh mk_rssh_chroot_jail.sh application/octet-stream Evert 2004-06-23 05:10 0000 1.04 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 54754 depends on: Show dependency tree
Bug 54754 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-06-22 09:13 0000
Posted on Bugtraq and rssh mailing list:
http://sourceforge.net/mailarchive/forum.php?thread_id=4963858&forum_id=33294

rssh is a small shell whose purpose is to restrict users to using scp
or sftp, and also provides the facilities to place users in a chroot
jail.  It can also be used to lock users out of a system completely.
William F. McCaw identified a minor security flaw in rssh when used
with chroot jails.

There is a bug in rssh 2.0 - 2.1.x which allows a user to gather
information outside of a chrooted jail unintentionally.  The latest
release of rssh fixes this problem, and also improves support for
some non-openssh sftp clients.  Additionally, it extends rssh by
allowing cvs, rsync, and rdist.

The cause of the problem identified by Mr. McCaw is that rssh expanded
command-line arguments prior to entering the chroot jail.  This bug
DOES NOT allow a user to access any of the files outside the jail, but
can allow them to discover what files are in a directory which is
outside the jail, if their credentials on the server would normally
allow them read/execute access in the specified directory.

For example (from William's bug report), if a user has an account on a
server machine which restricts them into a jail using rssh, the
user can use the following command to access the server and see what
files exist in the /etc directory:

  scp target:/etc/* .

The results of this command will look something like this:

  scp: /etc/DIR_COLORS: No such file or directory
  scp: /etc/HOSTNAME: No such file or directory
  scp: /etc/X11: No such file or directory
  scp: /etc/adjtime: No such file or directory
  [ ... ]
  ld.so.cache                                  100%  675     0.0KB/s 00:00
  ld.so.conf                                   100%    0     0.0KB/s 00:00
  [ ... ]
  passwd                                       100%   51     0.0KB/s 00:00
  [ ... ]
  scp: /etc/termcap-Linux: No such file or directory
  scp: /etc/updatedb.conf: No such file or directory
  scp: /etc/warnquota.conf-sample: No such file or directory
  scp: /etc/xml: No such file or directory

The files which succeed in copying exist inside the chroot jail, and
thus should be harmless.  All of the files which produce an error
message exist in the system's /etc directory, but do not exist inside
the chroot jail.  The user is placed in the jail before access to any
of these files is attempted, so again, it is not possible to access
them.  For many sites, this is not a serious issue.  However if it is
important at your site that users not be able to know about any files
which exist outside the chroot jail, then you should upgrade as soon
as possible.

The 2.2.0 release of rssh fixed the problem in question, but was
mistakenly released missing some code for parsing per-user options.  
The 2.2.1 release corrects that problem, and should be the final
release of rssh.  No further development is planned.

You can get the latest release of rssh here:

  http://www.pizzashack.org/rssh/

Thanks for using rssh!

-- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D 

Reproducible: Always
Steps to Reproduce:

------- Comment #1 From Sune Kloppenborg Jeppesen 2004-06-22 09:34:09 0000 -------
bumping the ebuild to 2.2.1 seems to do the trick.

------- Comment #2 From Sune Kloppenborg Jeppesen 2004-06-22 09:36:53 0000 -------
A bit early to CC arches, CC'ing maintainers instead.

Please bump.

------- Comment #3 From SpanKY 2004-06-22 16:25:47 0000 -------
version bumped and i tested it on my x86/ppc/sparc

just need the GLSA

------- Comment #4 From Evert 2004-06-23 05:10:13 0000 -------
Created an attachment (id=33941) [details]
mk_rssh_chroot_jail.sh

A bit out of subject, but I created a script which can be used to create a
chroot jail on gentoo and I'd like to share this...

------- Comment #5 From Sune Kloppenborg Jeppesen 2004-06-23 05:18:22 0000 -------
Closing without GLSA.

Evert please open a new bug for the script.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug