SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com






Category:   Application (Generic)  >   Gzip Vendors:   GNU [multiple authors]
Gzip zgrep Implementation May Let Remote Users Execute Arbitrary Commands
SecurityTracker Alert ID:  1013928
SecurityTracker URL:  http://securitytracker.com/id/1013928
CVE Reference:   CAN-2005-0758   (Links to External Site)
Date:  May 10 2005
Impact:   Execution of arbitrary code via network, User access via network
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 1.2.4
Description:   A vulnerability was reported in gzip in the zgrep implementation. A remote user may be able to cause arbitrary commands to be executed.

The zgrep code does not properly validate user-supplied arguments. If arguments originate from an untrusted source, then a user may be able to cause arbitrary commands to be executed on the target system.

The flaw resides in 'zgrep.in'.

Impact:   A remote user may be able to cause arbitrary commands to be executed.
Solution:   A patch for 'zgrep.in' is available in the following bug report:

http://bugs.gentoo.org/show_bug.cgi?id=90626

Vendor URL:  www.gzip.org/ (Links to External Site)
Cause:   Input validation error
Underlying OS:   Linux (Any), UNIX (Any)

Message History:   None.


 Source Message Contents

Date:  Tue, 10 May 2005 00:31:50 -0400
Subject:  [none]



This old issue seems unfixed in our zgrep.

> zgrep contains the following gem:
>
> for i do
> [snip]
>      if test $with_filename -eq 1; then
>        sed_script="s|^[^:]*:|${i}:|"
>      else
>        sed_script="s|^|${i}:|"
>      fi
>      $grep $opt "$pat" | sed "$sed_script"
> [snip]
> done
>
> Aside of the correctness issues (try to use zgrep on files with e.g. '&' in
> names), it leads to obvious fun when zgrep arguments had been obtained
> by globbing in an untrusted place.  Even with standard sed we have at
> least ;w<filename>; to deal with; for GNU sed there's also ;e; on top
> of that (execute the contents of pattern space).  bzgrep is no better -
> it's based on zgrep.
>
> AFAICS, there are two solutions - one is to do what *BSD had done and
> make grep(1) use zlib and libbz; then zgrep et.al. become links to
> grep.  Another is to quote \, |, ; and newlines, which means extra
> invocation of sed(1)...
 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

Copyright 2014, SecurityGlobal.net LLC