Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26854 - rbash in bash-2.05b NOT restricted
Summary: rbash in bash-2.05b NOT restricted
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: x86 Linux
: High critical
Assignee: Gentoo Security
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-18 04:22 UTC by Martin Lesser
Modified: 2011-10-30 22:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Lesser 2003-08-18 04:22:07 UTC
Using rbash (from bash-2.05b) as login-shell in /etc/passwd opens an unrestricted shell. 

Same bug was reported in debian several months ago (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=170298)

IMO this is a security relevant bug at least for systems where the restricted features of the bash 

- by 'ln -s /bin/bash /bin/rbash' and
- defining /bin/rbash for users in /etc/passwd as shell

should be used. On systems depending on this feature a downgrade to bash-2.05a (which does not show this behaviour) seems recommended.
Comment 1 solar (RETIRED) gentoo-dev 2003-08-18 19:06:35 UTC
Temp work around patching comming soon.
--------------- rbash.c -----------------------
#include <unistd.h>
int main(int argc, char **argv, char **envp) {
  char *ARGV[] = { "/bin/bash", "-r", NULL };
  return execve("/bin/bash", ARGV, envp);
}
-----------------------------------------------
Comment 2 solar (RETIRED) gentoo-dev 2003-08-18 23:06:58 UTC
rbash support for 2.05(b) is would be new functionality for bash on gentoo, and this problem is not serious enough to warrant any type of security advisory imo.

However we can add Matthias Eckermann patch from http://mail.gnu.org/archive/html/bug-bash/2003-01/msg00074.html 
to bash-2.05b-r7 ~masked as well as a dosym to create a rbash symlink to /bin/bash by default. I've tested here local and it seems to works great.

If no objections pop up in the next day or two I'll be happy to commit this to portage.
Comment 3 solar (RETIRED) gentoo-dev 2003-08-19 16:10:56 UTC
Support for restricted bash when invoked from /etc/passwd as /bin/rbash was added to portage.

Changing bug status to TEST-REQUEST.
Comment 4 solar (RETIRED) gentoo-dev 2003-09-28 13:48:05 UTC
marked stable.

changing resolution to FIXED
Comment 5 solar (RETIRED) gentoo-dev 2003-09-30 13:30:40 UTC
changing resolution to FIXED again.