CVE-2006-1168: High severity ncompress ncompress vulnerability

Published Aug 8, 2006
·
Updated

Report from Tavis Ormandy, Google Security Team:

An audit of ncompress version 4.2.4 uncovered a serious security flaw, this loop in decompress() (~1749, compress42.c) performs no bounds checking, allowing a specially crafted datastream to underflow a .bss buffer with attacker controlled data. Some research reveals that the lzw decompressors from gzip and openbsd (both derived from the same public domain implementation) have already corrected this flaw, however ncompress shipped by (at least) gentoo, debian, fedora and suse seem to still be vulnerable.

while ((cmpcodeint)code >= (cmpcodeint)256) { / Generate output characters in reverse order / --stackp = tabsuffixof(code); code = tabprefixof(code); }

In my test environment I've been able to successfully overwirte .got and .dtors with controlled data. The most simple testcase would be:

$ perl -e 'print "\x1f\x9d\x90","\x01"x"2048"' | compress -d

My suggested fix would be adding && stackp >= htabof(0) to the loop condition.

Other sources

The decompress function in compress42.c in (1) ncompress 4.2.4 and (2) liblzw allows remote attackers to cause a denial of service (crash), and possibly execute arbitrary code, via crafted data that leads to a buffer underflow.

Red Hat

Affected Software

5 affected componentsFixes available
redhat/ncompress<0:4.2.4-39.rhel3
0:4.2.4-39.rhel3
redhat/ncompress<0:4.2.4-43.rhel4
0:4.2.4-43.rhel4
redhat/busybox<1:1.2.0-13.el5
1:1.2.0-13.el5
redhat/busybox<1:1.15.1-15.el6
1:1.15.1-15.el6
ncompress ncompress=4.2.4

Event History

Aug 8, 2006
CVE Published
via Red Hat·12:00 AM
Aug 9, 2006
Data Sourced
via Red Hat·07:21 PM
DescriptionSeverityAffected Software
Aug 15, 2006
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2006-1168?

CVE-2006-1168 is classified as a critical vulnerability due to its potential for buffer underflow, which could be exploited to execute arbitrary code.

2

How do I fix CVE-2006-1168?

To mitigate CVE-2006-1168, update ncompress to version 0:4.2.4-39.rhel3 or higher for Red Hat Enterprise Linux 3, or the equivalent versions for other affected distributions.

3

What software is affected by CVE-2006-1168?

CVE-2006-1168 affects ncompress version 4.2.4 and specific versions of busybox as outlined in various Red Hat distributions.

4

What type of vulnerability is CVE-2006-1168?

CVE-2006-1168 is a buffer underflow vulnerability that occurs due to insufficient bounds checking in the decompress function.

5

Is CVE-2006-1168 still relevant today?

Although CVE-2006-1168 was reported in 2006, it remains relevant for systems still utilizing vulnerable versions of ncompress or busybox.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203