[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
NetBSD Security Advisory 2016-002: BDF file parsing issues in libXfont
-----BEGIN PGP SIGNED MESSAGE-----
NetBSD Security Advisory 2016-002
Topic: BDF file parsing issues in libXfont
Version: NetBSD-current: affected prior to 20150319
NetBSD 6.1 - 6.1.5: affected
NetBSD 6.0 - 6.0.6: affected
NetBSD 5.1 - 5.1.4: affected
NetBSD 5.2 - 5.2.2: affected
Severity: remote DoS, potential local privilege escalation
Fixed: NetBSD-current: March 18th, 2015
NetBSD-6 branch: March 18th, 2015
NetBSD-6-1 branch: March 18th, 2015
NetBSD-6-0 branch: March 18th, 2015
NetBSD-5 branch: March 18th, 2015
NetBSD-5-2 branch: March 18th, 2015
NetBSD-5-1 branch: March 18th, 2015
pkgsrc: libXfont-1.5.1 corrects this issue
Please note that NetBSD releases prior to 5.1 are no longer supported.
It is recommended that all users upgrade to a supported release.
Ilja van Sprundel, a security researcher with IOActive, has discovered an
issue in the parsing of BDF font files by libXfont. Additional testing by
Alan Coopersmith and William Robinet with the American Fuzzy Lop (afl)
tool uncovered two more issues in the parsing of BDF font files.
As libXfont is used by the X server to read font files, and an
unprivileged user with access to the X server can tell the X server to
read a given font file from a path of their choosing, these
vulnerabilities have the potential to allow unprivileged users to run
code with the privileges of the X server (often root access).
These vulnerabilities have been assigned CVE-2015-1802, CVE-2015-1803,
CVE-2015-1802: bdfReadProperties: property count needs range check
The bdf parser reads a count for the number of properties defined in a
font from the font file, and allocates arrays with entries for each
property based on that count. It never checked to see if that count was
negative, or large enough to overflow when multiplied by the size of
the structures being allocated, and could thus allocate the wrong
buffer size, leading to out of bounds writes.
CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read
If the bdf parser failed to parse the data for the bitmap for any
character, it would proceed with an invalid pointer to the bitmap data
and later crash when trying to read the bitmap from that pointer.
CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct
The bdf parser read metrics values as 32-bit integers, but stored them
into 16-bit integers. Overflows could occur in various operations
leading to out-of-bounds memory access.
X.Org believes all prior versions of this library contain these flaws,
dating back to its introduction in X11R5.
Solutions and Workarounds
Workaround: don't allow clients that might open unvetted fonts on
your X server. Note this includes web browsers.
Solution: replace a vulnerable libXfont with a fixed version.
with REL being your NetBSD release version
DATE being a date past the fix date for your release
ARCH being the architecture of the system to be fixed
libXfont paths will differ by version and architecture, depending on
whether your architecture uses /usr/X11R6 or /usr/X11R7:
all versions ./usr/X11R7/lib/libXfont.so
so e.g. for a NetBSD 6.0 or younger amd64 system you'd do:
cd / && tar xzpf path-to/xbase.tgz ./usr/X11R7/lib/libXfont.so \
- From source:
affected files and fixed versions are:
use build.sh -x distribution to build a new system including X after
updating your source.
Thanks to Ilja van Sprundel, Alan Coopersmith and William Robinet and the
text of X.Org advisory 2015-03-17
2016-04-16 Initial release
Advisories may be updated as new information becomes available.
The most recent version of this advisory (PGP signed) can be found at
Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.org/ and http://www.NetBSD.org/Security/ .
Copyright 2015, The NetBSD Foundation, Inc. All Rights Reserved.
Redistribution permitted only in full, unmodified form.
$NetBSD: NetBSD-SA2016-002.txt,v 1.1 2016/04/16 15:18:30 christos Exp $
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----END PGP SIGNATURE-----
Main Index |
Thread Index |