Subject: NetBSD Security Advisory 2005-009: Insecure /tmp file usage when building using imake
To: None <tech-security@NetBSD.org, current-users@NetBSD.org>
From: NetBSD Security-Officer <firstname.lastname@example.org>
Date: 11/08/2005 09:58:44
-----BEGIN PGP SIGNED MESSAGE-----
NetBSD Security Advisory 2005-009
Topic: Insecure /tmp file usage when building using imake
Version: NetBSD-current: source prior to September 13, 2005
NetBSD 2.1: not affected
NetBSD 2.0.3: not affected
NetBSD 2.0.2: affected
NetBSD 2.0: affected
NetBSD 1.6.2: affected
NetBSD 1.6.1: affected
NetBSD 1.6: affected
pkgsrc: imake package prior to 4.4.0nb2 and
xorg-imake prior to 6.8.2nb2
Severity: overwrite arbitrary files on the system
Fixed: NetBSD-current: September 12, 2005
NetBSD-3 branch: September 12, 2005
(3.0 will include the fix)
NetBSD-2.0 branch: September 13, 2005
(2.0.3 includes the fix)
NetBSD-2 branch: September 13, 2005
(2.1 includes the fix)
NetBSD-1.6 branch: September 14, 2005
(1.6.3 will include the fix)
pkgsrc: imake-4.4.0nb2 and xorg-imake-6.8.2nb2
or higher correct the issue
Makefiles generated with imake use an insecure temporary file in /tmp
The issue is in the make target for generating the pre-formatted manual
page. This is for software using imake using NetBSD.cf for builds.
Malicious users can pre-generate symlinks to point to important files
(so they will be overwritten) and possibly cause a local denial of
service if the make process is run with elevated privileges.
On NetBSD, many pkgsrc packages built using imake are affected. For
example, building xvier, xmeter, transfig, tightvncviewer, xcolorsel,
magicpoint, fvwm1, xearth, xalarm, xmmix, and many others, use this make
This issue has been reported to and corrected by X.org and XFree86.
Solutions and Workarounds
This issue affects only machines which build software using imake and
which also use the target to generate pre-formatted manual pages.
However, since no binary rebuilding is required in order to fix this
issue, it is recommended that all users upgrade their sources.
The following instructions describe how to update your source tree.
Source trees dated from before 2005-09-12 should be upgraded to
sources dated 2005-09-13 or later.
The following directories need to be updated from CVS:
To update from CVS:
# cd xsrc
# cvs update -d -P xfree/xc/config/cf/NetBSD.cf
# cp xfree/xc/config/cf/NetBSD.cf /usr/X11R6/lib/X11/config/NetBSD.cf
The issue was discovered and reported by Jeremy C. Reed.
2005-10-31 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 2005, The NetBSD Foundation, Inc. All Rights Reserved.
Redistribution permitted only in full, unmodified form.
$NetBSD: NetBSD-SA2005-009.txt,v 1.15 2005/10/31 19:07:50 gendalia Exp $
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)
-----END PGP SIGNATURE-----