Bugtraq mailing list archives
Re: Bash Bug
From: drow () FALSE ORG (Daniel Jacobowitz)
Date: Thu, 22 Apr 1999 17:43:24 -0400
On Fri, Apr 23, 1999 at 12:02:57AM +0300, Guy Cohen wrote:
Unfortunately this is not true. here is why: rush:/tmp> bash --version GNU bash, version 2.03.0(1)-release (i586-pc-linux-gnu) Copyright 1998 Free Software Foundation, Inc. rush:/tmp> bash bash-2.03$ echo $PS1 \s-\v\$ bash-2.03$ cat ~/.rhosts cat: /export/home/guy/.rhosts: No such file or directory bash-2.03$ mkdir "\ `echo -e \ "echo + +> ~\57.rhosts\ " > x; source x; rm -f \x\ ` " bash-2.03$ cd \\\ \ / bash-2.03$ cat /export/home/guy/.rhosts\ + + sh-2.03$
That's a quoting error. Look at the mkdir command you typed, and observe that the backticks are not escaped - thus even inside of "" they are evaluated. Witness: $ ls /drow/.rh* ls: /drow/.rh*: No such file or directory $ echo $PS1 \$ $ mkdir "\ `echo -e \ "echo + +> ~\57.rhosts\ " > x; source x; rm -f \x\ ` " $ ls /drow/.rhosts\ /drow/.rhosts It doesn't even get .rhosts right - there's a space at the end. You told bash to make the directory: `echo -e \ "echo + +> ~\57.rhosts\ " > x; source x; rm -f \x\ ` Dan /--------------------------------\ /--------------------------------\ | Daniel Jacobowitz |__| CMU, CS class of 2002 | | Debian GNU/Linux Developer __ Part-Time Systems Programmer | | dan () debian org | | drow () cs cmu edu | \--------------------------------/ \--------------------------------/
Current thread:
- Re: Bash Bug Andy Church (Apr 21)
- Re: Bash Bug Guy Cohen (Apr 22)
- WebShop advisory. Elaich Of Hhp (Apr 22)
- cold fusion scanner hYP0[13/\r (Apr 22)
- Re: Bash Bug Daniel Jacobowitz (Apr 22)
- Final Call for Papers - CQRE [Secure] networking Detlef Hühnlein (Apr 23)
- Ffingerd privacy issues Eilon Gishri (Apr 23)
- Re: Ffingerd privacy issues Felix von Leitner (Apr 23)
- Re: Ffingerd privacy issues Eilon Gishri (Apr 23)
- Re: Ffingerd privacy issues Dagmar d'Surreal (Apr 23)
- Re: Bash Bug Guy Cohen (Apr 22)
- Re: Bash Bug Ph. Rueegsegger (Apr 23)
- <Possible follow-ups>
- Re: Bash Bug Henrik Nordstrom (Apr 22)