GNU Gzip, XZ Utils: Arbitrary file write — GLSA 202209-01

A vulnerability has been discovered in GNU Gzip and XZ Utils' grep helpers which could result in writes to arbitrary files.

Affected packages

app-arch/gzip on all architectures
Affected versions < 1.12
Unaffected versions >= 1.12
app-arch/xz-utils on all architectures
Affected versions < 5.2.5
Unaffected versions >= 5.2.5

Background

GNU Gzip is a popular data compression program. XZ Utils is free general-purpose data compression software with a high compression ratio.

Description

GNU Gzip and XZ Utils' grep helpers do not sufficiently validate certain multi-line file names.

Impact

In some cases, writing to arbitrary files such as shell initialization files can be escalation to remote code execution.

Workaround

Ensuring only trusted input is passed to GNU Gzip and XZ Utils' grep helpers minimizes the potential impact.

Resolution

All GNU Gzip users should upgrade to the latest version:

 # emerge --sync
 # emerge --ask --oneshot --verbose ">=app-arch/gzip-1.12"
 

All XZ Utils users should upgrade to the latest version:

 # emerge --sync
 # emerge --ask --oneshot --verbose ">=app-arch/xz-utils-5.2.5"
 

References

Release date
September 07, 2022

Latest revision
September 07, 2022: 1

Severity
high

Exploitable
remote

Bugzilla entries