Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 16 Sep 2016 15:46:51 -0400
From: Chet Ramey <chet.ramey@...e.edu>
To: John Haxby <john.haxby@...cle.com>, oss-security@...ts.openwall.com
Cc: chet.ramey@...e.edu
Subject: Re: CVE-2016-0634 -- bash prompt expanding $HOSTNAME

On 9/16/16 12:16 PM, John Haxby wrote:
> Hello All,
> 
> A little while ago, one of our users discovered that by setting the
> hostname to $(something unpleasant), bash would run "something
> unpleasant" when it expanded \h in the prompt string.

I finally got this message, three hours later.

I assume you're using $HOSTNAME as a shorthand; bash only uses the
return value from gethostname().

It's unlikely that something like this could be accomplished without
existing privilege.  If you have a fake DHCP server on your network, for
instance, you have massive problems aside from this issue.  If someone
sets the hostname on the local machine, he already has privilege.

> 
> I believe the fix in parse.y is this (Chet, please correct me if I'm wrong):

Yes, that is the current fix for this.  There are other ways to do it.

This issue has been public since October, 2015, in Ubuntu's bash bug
database.

https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1507025

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@...e.edu    http://cnswww.cns.cwru.edu/~chet/

Powered by blists - more mailing lists

Your e-mail address:

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.