Stories
Slash Boxes
Comments

SoylentNews is people

posted by n1 on Thursday September 25 2014, @01:59AM   Printer-friendly
from the well,-that's-not-ideal dept.

Ars reports that a new bug has been found in GNU Bash allows remote attackers to execute arbitrary code by setting the process trailing strings after function definitions in the values of environment variables.

This bug is reported to be present in RHEL (ver 4 through 7), Fedora, CentOS (ver 5 through 7), Ubuntu (ver 10.04 LTS, 12.04 LTS, and 14.04 LTS), Debian, and even OS X Mavericks.

This bug is exploitable through Apache servers with mod_cgi and mod_cgid loaded, OpenSSH, malicious DHCP servers in a compromised wireless access point through dhclient, as well as the CUPS printing system.

The Ars also includes a simple single liner that will test your setup for the newly found discovery:

env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

A vulnerable system will output the following:

vulnerable
 this is a test

While a patched or unaffected system outputs:

bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test

A patch is already out, so administrators are advised to update Bash.

Editor's Update: Security Engineer Tavis Ormandy has said "The bash patch seems incomplete to me, function parsing is still brittle".

$ env X='() { (a)=>\' sh -c "echo date"; cat echo

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by digitalaudiorock on Thursday September 25 2014, @03:13PM

    by digitalaudiorock (688) on Thursday September 25 2014, @03:13PM (#98268) Journal

    Wow...there's a lot of news around this one, but very few mentioning what's already been pointed out here...that the "fix" was not complete:

    https://bugzilla.redhat.com/show_bug.cgi?id=1141597#c23 [redhat.com]

    I'm assuming there is in fact a correct fix, as an update on my Gentoo systems has corrected the second issue mentioned there:

    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

    ...but the newest version in CentOS 6 is clearly not right yet:

    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

    Scary stuff.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 1) by captainClassLoader on Thursday September 25 2014, @10:06PM

    by captainClassLoader (4375) on Thursday September 25 2014, @10:06PM (#98417)

    I just updated bash on Cygwin to 4.1.11, and my tests match your results on CentOS. Issue 1 is fixed, issue 2 is not.