Subject: NetBSD Security Advisory 2006-020: Integer overflows in PCF font parsers
To: None <current-users@NetBSD.org>
From: NetBSD Security-Officer <security-officer@netbsd.org>
List: current-users
Date: 09/21/2006 22:35:29
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


		 NetBSD Security Advisory 2006-020
		 =================================

Topic:		Integer overflows in PCF font parsers

Version:	NetBSD-current:	source prior to August 28, 2006
		NetBSD 4.0_BETA:	affected
		NetBSD 3.1_RC2:		not affected
		NetBSD 3.0.*:		affected
		NetBSD 3.0:		affected
		NetBSD 2.1:		affected
		NetBSD 2.0.*:		affected
		NetBSD 2.0:		affected
		pkgsrc: 		xorg-libs-6.9.0nb6 and earlier
					XFree86-libs-4.4.0nb7 and earlier

Severity:	Denial of service and potential privilege escalation

Fixed:		NetBSD-current:		August 28, 2006
		NetBSD-4 branch:	August 29, 2006
			(4.0 will include the fix)
		NetBSD-3-0 branch:	August 29, 2006
			(3.0.2 will include the fix)
		NetBSD-3   branch:	August 29, 2006
			(3.1 will include the fix)
		NetBSD-2-1 branch:	August 29, 2006
		NetBSD-2-0 branch:	August 29, 2006
		NetBSD-2   branch:	August 29, 2006
		pkgsrc:			xorg-libs-6.9.0nb7 corrects the issue
					XFree86-libs-4.4.0nb8 corrects the issue


Abstract
========

There are integer overflows present in the PCF font parsers as supplied 
with both XFree86 and X11R7.0.  This can lead to a denial of service 
attack and potentially arbitrary code execution.  This vulnerability 
can be triggered by a user parsing an untrusted PCF font file.

This vulnerability has been assigned CVE reference CVE-2006-3467.

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

Integer overflows in the PCF font parsers can crash the X servers and
potentially lead to arbitrary code execution.

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

While X11R7.0 from X.Org is in both the HEAD and netbsd-4 branches it
is currently not integrated fully into the base distribution.  No NetBSD
releases contain X11R7.0 binaries and as such it is not necessary to 
rebuild anything from source.  The instructions below will patch the 
relevant X11R7.0 source files so that if users are experimenting with 
X11R7.0 it will contain the necessary security fixes.

XFree86-based X servers are included in the NetBSD base distribution,
and will need to be rebuilt.  The following instructions describe how
to upgrade your XFree86 binaries by updating your source tree and
rebuilding and installing a new version of XFree86.

* NetBSD-current:

	Systems running NetBSD-current dated from before 2006-08-28
	should be upgraded to NetBSD-current dated 2006-08-29 or later.

	The following files need to be updated from CVS HEAD:
		xfree/xc/lib/font/bitmap/pcfread.c
		xorg/lib/Xfont/src/bitmap/pcfread.c

	To update from CVS, re-build, and re-install XFree86:

		# cd xsrc
		# cvs update xfree/xc/lib/font/bitmap/pcfread.c
		# cvs update xorg/lib/Xfont/src/bitmap/pcfread.c
		# make build

* NetBSD 3.*:

	Systems running NetBSD 3.* sources dated from before
	2006-08-29 should be upgraded from NetBSD 3.* sources dated
	2006-08-30 or later.

	The following files need to be updated from the
	netbsd-3 or netbsd-3-0 CVS branch:
		xfree/xc/lib/font/bitmap/pcfread.c

	To update from CVS, re-build, and re-install XFree86:

		# cd xsrc
		# cvs update -r <branch_name> \
			xfree/xc/lib/font/bitmap/pcfread.c
		# make build

* NetBSD 2.*:

	Systems running NetBSD 2.* sources dated from before
	2006-08-29 should be upgraded from NetBSD 2.* sources dated
	2006-08-30 or later.

	The following files need to be updated from the
	netbsd-2, netbsd-2-0 or netbsd-2-1 CVS branch:
		xfree/xc/lib/font/bitmap/pcfread.c

	To update from CVS, re-build, and re-install XFree86:

		# cd xsrc
		# cvs update -r <branch_name> \
			xfree/xc/lib/font/bitmap/pcfread.c
		# make build

Thanks To
=========

Chris Evans is credited with the discovery of the FreeType issue.
Werner Lemberg is credited with linking the FreeType issue to X PCF readers.

Revision History
================

	2006-09-21	Initial release


More Information
================

Advisories may be updated as new information becomes available.
The most recent version of this advisory (PGP signed) can be found at 
  ftp://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2006-020.txt.asc

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


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

$NetBSD: NetBSD-SA2006-020.txt,v 1.4 2006/09/21 13:33:13 adrianp Exp $

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iQCVAwUBRRLz7z5Ru2/4N2IFAQJL5gQAoiCxLQBG+sQAWlcnL4qvdR1j0prMioeC
w4kfBndLnFzHEHolpLGse9EcF449HwLHxKld9/K5gaCkNmMTv1QiuBjRrXpynvCo
zjOxvsMTROfFsl78XLiwr0BTie7T7rxQ31eNM2ci1qZOZNthmcO5845PfSOn4+TA
3eUUlST98gI=
=hGi1
-----END PGP SIGNATURE-----