Bug 725760
Summary: | CVE-2011-2895 libXfont: LZW decompression heap corruption / infinite loop | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Other] Security Response | Reporter: | Tomas Hoger <thoger> | ||||||||
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | |||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | high | ||||||||||
Version: | unspecified | CC: | ajax, kem, sandmann, security-response-team | ||||||||
Target Milestone: | --- | Keywords: | Security | ||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | libXfont 1.4.4 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2012-06-20 15:24:28 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | 728442, 728443, 728444, 728445, 728447, 729870, 752934, 833925 | ||||||||||
Bug Blocks: | 714279, 727624, 752971 | ||||||||||
Attachments: |
|
Description
Tomas Hoger
2011-07-26 13:41:27 UTC
(In reply to comment #0) > libXfont contains a compress / LZW decompressor implementation. LZW decompression implementations in libXfont, ncompress and gzip all seem to be based on the same implementation. ncompress and gzip already contain a check for code > free_ent and abort decompression in such case. Other code bases derived from the same source (such as GIF parsers in mozilla/libpr0n and gd) check for stack[] overflow in the while loop. Created attachment 516719 [details]
My proposed patch - variant 1
Checks code values, similar to ncompress/gzip.
Created attachment 516721 [details]
My proposed patch - variant 2
de_stack overflow check in the while loop, similar to what OpenBSD compress does.
Created attachment 516759 [details]
Updated proposed patch
Making this public. libXfont fixed upstream in version 1.4.4: http://lists.freedesktop.org/archives/xorg-announce/2011-August/001721.html http://lists.freedesktop.org/archives/xorg-announce/2011-August/001722.html http://cgit.freedesktop.org/xorg/lib/libXfont/commit/?id=d11ee5886e9d9ec610051a206b135a4cdc1e09a0 Created libXfont tracking bugs for this issue Affects: fedora-all [bug 729870] This issue has been addressed in following products: Red Hat Enterprise Linux 5 Red Hat Enterprise Linux 6 Via RHSA-2011:1154 https://rhn.redhat.com/errata/RHSA-2011-1154.html This issue has been addressed in following products: Red Hat Enterprise Linux 4 Via RHSA-2011:1155 https://rhn.redhat.com/errata/RHSA-2011-1155.html An improved fix was committed to upstream git repository. It improves input checks to avoid decompression table loops and increases decompression stack size, instead of performing stack boundary checks: http://cgit.freedesktop.org/xorg/lib/libXfont/commit/src/fontfile/decompress.c?id=bd48ad11fd11412c62c3ac8ed5d52c4f10a985aa This issue has been addressed in following products: Red Hat Enterprise Linux 5.6.Z - Server Only Via RHSA-2011:1834 https://rhn.redhat.com/errata/RHSA-2011-1834.html |