Gentoo Logo

gzip: Insecure creation of temporary files

Content:

1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200406-18 / gzip
Release Date June 24, 2004
Latest Revision May 22, 2006: 02
Impact normal
Exploitable local
Package Vulnerable versions Unaffected versions Architecture(s)
app-arch/gzip <= 1.3.3-r3 >= 1.3.3-r4 All supported architectures

Related bugreports: #54890

Synopsis

gzip contain a bug potentially allowing an attacker to execute arbitrary commands.

2.  Impact Information

Background

gzip (GNU zip) is popular compression program. The included gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them.

Description

The script gzexe included with gzip contains a bug in the code that handles tempfile creation. If the creation of a temp file fails when using gzexe fails instead of bailing out it executes the command given as argument.

Impact

This could lead to priviege escalation by running commands under the rights of the user running the self extracting file.

3.  Resolution Information

Workaround

There is no known workaround at this time. All users are encouraged to upgrade to the latest available version.

Resolution

All gzip users should upgrade to the latest stable version:

Code Listing 3.1: Resolution

# emerge sync

# emerge -pv ">=app-arch/gzip-1.3.3-r4"
# emerge ">=app-arch/gzip-1.3.3-r4"

Additionally, once the upgrade is complete, all self extracting files created with earlier versions gzexe should be recreated, since the vulnerability is actually embedded in those executables.

4.  References



Print

Page updated June 24, 2004

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

Copyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.