
# eix app-shells/bash
app-shells/bash
Available versions:
(3.1) 3.1_p17 3.1_p18
(3.2) 3.2_p51 3.2_p52
(4.0) 4.0_p38 4.0_p39
(4.1) 4.1_p11 4.1_p12
(0) 4.2_p45 4.2_p48 **4.3_p25
{afs bashlogger examples mem-scramble +net nls plugins +readline vanilla}
Installed versions: 4.2_p45(22:02:45 07/24/13)(net nls readline -afs -bashlogger -examples -mem-scramble -plugins -vanilla)
Homepage: http://tiswww.case.edu/php/chet/bash/bashtop.html
Description: The standard GNU Bourne again shell
* app-shells/bash-completion
Kilteroff wrote:I'm sorry, how do you do this? My Emerge&Portage skills are still in devel -_-
Code: Select all
emerge --sync
emerge app-shells/bash

Code: Select all
emerge -1 app-shells/bash
Seems like patching should take priority, but is disabling sshd really necessary? FWICT only sshd configs with ForceCommand enabled are vulnerable? If you're not running GIT or SVN or the like your SSH may be OK. Please correct me if I'm mistaken.666threesixes666 wrote:http://seclists.org/oss-sec/2014/q3/649
yup, disable ssh or update....
<shamus397> try this: LC_TIME='() { :;}; echo vulnerable' ssh <your systems hostname here>
It also appears that the version in Gentoo seems to have addressed the fact that the original fix was incomplete:wuzzerd wrote:Awesome: Gentoo has already handled this problem. Free beer for the devs!!
Code: Select all
env X='() { (a)=>\' sh -c "echo date"; cat echo
sh: X: line 1: syntax error near unexpected token `='
sh: X: line 1: `'
sh: error importing function definition for `X'
date
cat: echo: No such file or directory
Code: Select all
env X='() { (a)=>\' sh -c "echo date"; cat echo
sh: X: line 1: syntax error near unexpected token `='
sh: X: line 1: `'
sh: error importing function definition for `X'
Thu Sep 25 11:11:58 EDT 2014

Code: Select all
root:spork:~> env X='() { (a)=>\' /bin/bash -c "echo date"; cat echo
/bin/bash: X: line 1: syntax error near unexpected token `='
/bin/bash: X: line 1: `'
/bin/bash: error importing function definition for `X'
date
Thu Sep 25 23:21:21 CEST 2014
root:spork:~>
Actually I think you're correct. I noticed earlier that the updated Gentoo version had no patch other than the one known to be incomplete.darookee wrote:And on the second it is the same. Am I missing something? It looks like it is not fixed...?
Code: Select all
equery list bash
* Searching for bash ...
[IP-] [ ] app-shells/bash-4.2_p48-r1:0
uname -a
Linux dell2 3.14.16-gentoo #1 SMP PREEMPT Tue Aug 19 11:25:32 EDT 2014 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz GenuineIntel GNU/Linux
env X='() { (a)=>\' sh -c "echo date"; cat echo
sh: X: line 1: syntax error near unexpected token `='
sh: X: line 1: `'
sh: error importing function definition for `X'
date
cat: echo: No such file or directory

Code: Select all
host4248r1$ bash
host4248r1$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test
host4248r1$ exit
exit
host4248r1$ bash
host4248r1$ rm -f echo
host4248r1$ env X='() { (a)=>\' sh -c "echo date"; cat echo
sh: X: line 1: syntax error near unexpected token `='
sh: X: line 1: `'
sh: error importing function definition for `X'
date
cat: echo: No such file or directory
host4248r1$
Code: Select all
host4245$ bash
host4245$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
host4245$ exit
exit
host4245$ bash
host4245$ rm -f echo
host4245$ env X='() { (a)=>\' sh -c "echo date"; cat echo
sh: X: line 1: syntax error near unexpected token `='
sh: X: line 1: `'
sh: error importing function definition for `X'
Thu Sep 25 17:43:15 MDT 2014
Code: Select all
host4248r1$ b() { (a)=> }
bash: syntax error near unexpected token `='
Code: Select all
$ equery list bash
[IP-] [ ] app-shells/bash-4.2_p48-r1:0
$ uname -a
Linux spork 3.10.17-gentoo #1 SMP Thu Nov 21 02:14:03 CET 2013 x86_64 AMD FX(tm)-4100 Quad-Core Processor AuthenticAMD GNU/Linux
$ env x='() { :;}; echo vulnerable' /bin/bash -c "echo this is a test"
/bin/bash: warning: x: ignoring function definition attempt
/bin/bash: error importing function definition for `x'
this is a test
Code: Select all
$ equery list bash
[IP-] [ ] app-shells/bash-4.3_p25-r1:0
$ uname -a
Linux mirinda 3.8.13 #3 SMP Sun Dec 15 21:23:34 CET 2013 x86_64 AMD Athlon(tm) II X2 240 Processor AuthenticAMD GNU/Linux
$ env x='() { :;}; echo vulnerable' /bin/bash -c "echo this is a test"
/bin/bash: warning: x: ignoring function definition attempt
/bin/bash: error importing function definition for `x'
this is a test

But still vulnerable...ChrisJumper wrote:The show must go on: app-shells/bash-4.2_p50 is available now.

bash tests#1@zdnet wrote: env 'x=() { :;}; echo vulnerable' 'BASH_FUNC_x()=() { :;}; echo vulnerable' bash -c "echo test"
NOTE: With bash-4.2_p50, bash replied with: test only. Good or bad, I don't know.bash result#1@zdnet wrote:
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `BASH_FUNC_x'
test
bash tests#2@zdnet wrote: cd /tmp; rm -f /tmp/echo; env 'x=() { (a)=>\' bash -c "echo date"; cat /tmp/echo
bash result#2 wrote:
date
cat: /tmp/echo: No such file or directory

Starting emerge -u -D -v -N world on 20141002_133808...
These are the packages that would be merged, in order:
Calculating dependencies .... .... done!
[ebuild U ] app-shells/bash-4.2_p51 [4.2_p48-r1] USE="examples net nls (readline) -afs -bashlogger -mem-scramble -plugins -vanilla" 13 kB
[ebuild U ] net-proxy/squid-3.3.13-r1 [3.3.13] USE="ipv6 ldap logrotate mysql pam ssl -caps -ecap -icap-client (-ipf-transparent) -kerberos (-kqueue) -nis (-pf-transparent) -postgres -qos -radius -samba -sasl (-selinux) -snmp -sqlite -ssl-crtd {-test} -tproxy" 0 kB
[ebuild U ~] media-gfx/ufraw-0.20 [0.19.2] USE="gnome gtk openmp -contrast -fits -gimp -timezone" 1,062 kB
[ebuild U ] net-misc/dhcpcd-6.4.7 [6.4.3] USE="ipv6 udev" 152 kB
[ebuild U ] sys-apps/portage-2.2.8-r2 [2.2.8-r1] USE="(ipc) -build -doc -epydoc (-pypy2_0) -python2 -python3 (-selinux) -xattr" LINGUAS="-ru" PYTHON_TARGETS="python2_7 python3_3 (-pypy2_0) (-python2_6) (-python3_2) (-python3_4)" 0 kB
[ebuild U ] dev-vcs/git-2.0.4 [1.8.5.5] USE="blksha1 curl doc emacs gpg gtk iconv nls pcre perl python subversion threads tk webdav -cgi -cvs -gnome-keyring -highlight -mediawiki (-ppcsha1) {-test} -xinetd" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" 4,628 kB
Total: 6 packages (6 upgrades), Size of downloads: 5,853 kB
>>> Verifying ebuild manifests
!!! Digest verification failed:
!!! /usr/portage/app-shells/bash/bash-4.1_p15.ebuild
!!! Reason: Filesize does not match recorded size
!!! Got: 4200
!!! Expected: 4201
I already re-synced once and got the same result.-> cat /usr/portage/metadata/timestamp.chk
Thu, 02 Oct 2014 11:30:01 +0000
