Users login

Create an account »

JOIN XATRIX

Users login

Home » Security Advisories» NetBSD » Make arbitrary files overwrite

Make arbitrary files overwrite

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.

  • Vendor: NetBSD
  • Vendor ID: 2005-009
  • Date: November 08, 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


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


Abstract
========

Makefiles generated with imake use an insecure temporary file in /tmp


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

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
target.

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:
xsrc/xfree/xc/config/cf/NetBSD.cf

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


Thanks To
=========

The issue was discovered and reported by Jeremy C. Reed.


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

2005-10-31 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-SA2005-009.txt.asc

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)

iQCVAwUBQ2fKiD5Ru2/4N2IFAQIdSgP+MDXNbQlHPnCDcOrZufC9dVFj9E0x6/w/
bwxsLNuEx0+kWUgkX61KmrvEyuq/9AnHOCMBScMijY8L1WOWx4MXe2dQCho5LtLW
EksP2mXDWC8y11b4OkVDp5SidroZDG/IgtC9o3M8qHZ6/KOsa2H8B7fXV86QmP8U
QxUjjLhtRfs=
=zj93
-----END PGP SIGNATURE-----

Newsletter signup

Signup to our monthly newsletter and stay in touch with IT news!

Free E-books

We've got ebooks! But they're not online. :( Please give us a few days to bring downloads back.

Contact

Have something to say or just wanna drop us a line? Please keep this in mind: to spam, we reply with spam.

Contact us »