[NetBSD] Schwachstelle in libXfont, gzip und compress - NetBSD-SA2011-007

—–BEGIN PGP SIGNED MESSAGE—–
Hash: SHA1

Liebe Kolleginnen und Kollegen,

soeben erreichte uns nachfolgende Warnung des NetBSD Security Officers.
Wir geben diese Informationen unveraendert an Sie weiter.

Die Implementierungen in gzip und compress zur Dekomprimierung von mit
LZW enkodierten Datenstroemen verwenden die gleiche Codebasis wie die
LibXfont, so dass diese gleichermassen von dieser Schwachstelle
betroffen sind.

CVE-2011-2895 – Schwachstelle in LibXFont

Die libXfont-Bibliothek verarbeitet nicht wohlgeformte Schrift-Dateien
fehlerhaft, die mittels des compress-Befehls mit dem
LZW-Komprimierungsverfahren (Lempel-Ziv-Welch Komprimierung) verkleinert
wurden. Dadurch ist es einem lokalen Angreifer ermoeglicht, das System
zum Absturz zu bringen und im schlimmsten Fall einen Buffer Overflow
auszuloesen, der es ihm erlaubt, beliebigen Code mit den Rechten des
X.Org-Servers auszufuehren.

Betroffen sind die folgenden Software Pakete und Plattformen:

libXfont
gzip
compress

NetBSD-current: Aug 16th, 2011
NetBSD-5-0 branch: Aug 19th, 2011 (5.0.3 wird einen Patch enthalten)
NetBSD-5-1 branch: Aug 19th, 2011 (5.1.1 wird einen Patch enthalten)
NetBSD-5 branch: Aug 19th, 2011
NetBSD-4-0 branch: Aug 19th, 2011
NetBSD-4 branch: Aug 19th, 2011
Fuer NetBSD Versionen vor 4.0 werden keine Patches mehr nachgereicht.

Vom Hersteller werden ueberarbeitete Pakete zur Verfuegung gestellt.

(c) der deutschen Zusammenfassung bei DFN-CERT Services GmbH; die
Verbreitung, auch auszugsweise, ist nur unter Hinweis auf den Urheber,
DFN-CERT Services GmbH, und nur zu nicht kommerziellen Zwecken
gestattet.

Mit freundlichen Gruessen,
Theodor Nolte

– —
Theodor Nolte, B.Sc. (Incident Response Team)

DFN-CERT Services GmbH, https://www.dfn-cert.de, Phone +49 40 808077-590
Sitz / Register: Hamburg, AG Hamburg, HRB 88805, Ust-IdNr.: DE 232129737
Sachsenstrasse 5, 20097 Hamburg/Germany, CEO: Dr. Klaus-Peter Kossakowski

Automatische Warnmeldungen: https://www.cert.dfn.de/autowarn

– —–BEGIN PGP SIGNED MESSAGE—–
Hash: SHA1

NetBSD Security Advisory 2011-007
=================================

Topic: LZW decoding loop on manipulated compressed files

Version: NetBSD-current: source prior to Aug 17th, 2011
NetBSD 5.0.*: affected
NetBSD 5.0: affected
NetBSD 5.1: affected
NetBSD 4.0.*: affected
NetBSD 4.0: affected

Severity: Denial of Service, possible Information Leak

Fixed: NetBSD-current: Aug 16th, 2011
NetBSD-5-0 branch: Aug 19th, 2011
(5.0.3 will include the fix)
NetBSD-5-1 branch: Aug 19th, 2011
(5.1.1 will include the fix)
NetBSD-5 branch: Aug 19th, 2011
NetBSD-4-0 branch: Aug 19th, 2011
NetBSD-4 branch: Aug 19th, 2011

Please note that NetBSD releases prior to 4.0 are no longer supported.
It is recommended that all users upgrade to a supported release.

Abstract
========

A highly compressable input file could overflow the uncompression stack
in libXfont. Also, specially crafted compressed files could cause gzip(1)
and compress(1) to go into an endless loop or overflow their uncompression
stack.

This vulnerability has been assigned CVE-2011-2895.

Technical Details
=================

There are two different issues termed “lzw uncompress issue”.

The first one is libXfont and the corresponding copy in XFree86’s server.
It contains a broken size definition of the uncompression stack.
If you create a highly compressable input file (e.g. from /dev/zero)
and pipe it through compress(1), the result can trivially overflow
the decompression stack.

For gzip(1) and compress(1), there was an issue with the input validation.
If the LZW input stream was manipulated to contain code words larger
than the current free entry, the decompressor would access uninitialised
memory. Depending on the content of this region, it is possible that
the output processing would loop or overflow the output stack.

While freetype and freetype2 have the same input validation issue, they
are protected by the use of memset(3) on some internal tables.

Both libarchive and GNU gzip contain the necessary input validation to
avoid the problem.

Solutions and Workarounds
=========================

Via download:
+++++++++++++
Download base.tgz and xbase.tgz from
http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2011-007.txt.asc

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.org/ and http://www.NetBSD.org/Security/ .

Copyright 2011, The NetBSD Foundation, Inc. All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2011-007.txt,v 1.1 2011/09/20 08:14:22 tonnerre Exp $

– —–BEGIN PGP SIGNATURE—–
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJOeEzFAAoJEAZJc6xMSnBuMgUQAM4JlhaDl84S9Gi1YB2r3vsF
+jl7bbwmPCRSMUZCxwsjraorSE++KvcNCOe+cYCPt8Jb6cBwJGeILtQsQpqb671e
gJwvUwMIJ5GXrmKzTcFcHW5d6yUJthU6ZvO8ftifobGeAgtS/9tOuaLMpsD9MQhj
EV33plHETDAQg0PZV6biIUiHD00vBJn1VXPFTPhoiq6mObmHy7huQ3X2bw5YZaBJ
f31wJxiUtgmEqK2nTS61ADerzUJTlIwHRCW401UUsSfi3aH7hB67U8aaa6Q1yaOY
RPtL1bm6mK6QxYxgUC7k4MeTAAirct34KIlO8miTCU1uw16sgIeTGL2MFZuccXW3
M7oPoRqPxQpuHhLnHhYz71AvhH1rqXRaGqn+d9cHbNNow1HQqLFUEY5BC1tSd83R
EodStDaZuhmdDT1P1QwczQtcJWGjJk40WS5VfQCwftnxZ5gcqTPKnNXsChOiKKCK
xUlP6azKpFjQ99iEtVFhT8K4b0bX6GOAhz/UZ1Or2quqlgHQAtzvDyKlrhWSsIro
gu8bR58D5bbfxBXNsLEQLGk2DFyjohEJvBOLQEyb0LiFvj7YCAISGdh0RWXn042K
nseijmE/4ZNev+ILX2X4njPXdNvNdttg//7WrDnfM8np7v8BTOogEiq0eILcMkNB
5z3J0XtLbJRNlbErRb/+
=Jzk2
– —–END PGP SIGNATURE—–
—–BEGIN PGP SIGNATURE—–
Version: GnuPG v2.0.16 (GNU/Linux)

iQEcBAEBAgAGBQJOedUQAAoJEJtyb8U7iGZByh4H/jveftDXEWhH4rVUyUumkX3P
9GEDUq+B2lFVyQem2iHA60qksdPyYqsRw0/4w3Ih6DZVxetf3OLUBprvu5vzxhVW
q1u/JD3e6Z4tFA33mWXU24cQWu92L6haZSFc2J3vRKEOjP9XhAJB1BysxCCjNxbp
Zh5DqWprNtMtJN5B6wAXdbza8S0PG1fJAaFp7BGeQjcefeUZzEuGLGNEI32iCHxK
9Ps8ksX2HuKAYu/kuh6qRI4zxXRwzGVaG36c4VGaqGBIMCBxxaLk4fNNBOQ1GNqF
0jMtPIka9NyDEFkKFl2s0TRKeJkFerrVPqCQkUy4xAHXapoUOk9hceL6kSYH65c=
=ZNxE
—–END PGP SIGNATURE—–

Nach oben