REDHAT-BUG-201919: Medium severity ncompress ncompress vulnerability

Published Aug 9, 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.

Affected Software

1 affected component
ncompress ncompress

Event History

Aug 9, 2006
Data Sourced
via Red Hat·07:21 PM
DescriptionSeverityAffected Software
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 REDHAT-BUG-201919?

The severity of REDHAT-BUG-201919 is considered critical due to the lack of bounds checking leading to potential buffer underflows.

2

How do I fix REDHAT-BUG-201919?

To fix REDHAT-BUG-201919, update to the latest version of ncompress that addresses the vulnerability.

3

What products are affected by REDHAT-BUG-201919?

REDHAT-BUG-201919 affects the ncompress package, specifically version 4.2.4.

4

What type of vulnerability is identified in REDHAT-BUG-201919?

REDHAT-BUG-201919 identifies a buffer underflow vulnerability due to insufficient bounds checking in ncompress.

5

How can REDHAT-BUG-201919 be exploited?

REDHAT-BUG-201919 can be exploited by sending a specially crafted datastream that underflows the .bss buffer.

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