SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Generic)  >   Ppp Vendors:   NetBSD
(NetBSD Issues Fix) 'pppd' Race Condition in Chmod() Call May Allow Local Users to Obtain Root Privileges on the System
SecurityTracker Alert ID:  1004934
SecurityTracker URL:  http://securitytracker.com/id/1004934
CVE Reference:   GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Aug 2 2002
Impact:   Modification of system information, Root access via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  

Description:   A vulnerability was reported in several vendors' Point-to-Point Protocol (PPP) daemon implementations. A local user may be able to obtain root privileges on the system.

A race condition vulnerability has been reported in 'pppd' that may allow a local user to change the permissions of an arbitrary file. The flaw apparently exists in 'main.c' and is due to an unsafe chmod() call.

A local user can reportedly specify a file as a tty device, causing pppd to open the file and record the original permissions of the file. If pppd subsequently fails to initialize the tty device (due to a failure of tcgetattr(3), for example), then pppd will then attempt to restore the original permissions by calling chmod(2). A local user can reportedly create a symbolic link from the file to another critical file on the system in such a manner that the call to chmod() will cause the original file permissions to be incorrectly applied to the linked file.

A local user could exploit this flaw to cause pppd to change the permissions on a critical root owned file so that the local user can edit the critical file. This could result in the local user gaining root privileges on the system.

The pppd program is reportedly installed with set user id (setuid) root privileges on most systems, so this flaw allows any file's permissions to be changed.

Impact:   A local user may be able to modify files on the system with root level privileges, giving the local user root access on the system.
Solution:   NetBSD has released a fix. The following instructions describe how to upgrade your pppd binaries by updating your source tree and rebuilding and installing a new version of pppd.

* NetBSD-current:

Systems running NetBSD-current dated from before 2002-07-30 should be upgraded to NetBSD-current dated 2002-07-31 or later.

The following directories need to be updated from the netbsd-current CVS branch (aka HEAD):
usr.sbin/pppd

To update from CVS, re-build, and re-install pppd:
# cd src
# cvs update -d -P usr.sbin/pppd

# cd usr.sbin/pppd
# make cleandir dependall
# make install


* NetBSD 1.6 beta:

The advisory will be updated to include instructions to remedy this problem for systems running the NetBSD-1.6 branch.


* NetBSD 1.5, 1.5.1, 1.5.2, 1.5.3:

The advisory will be updated to include instructions to remedy this problem for systems running the NetBSD-1.5 branch.


* NetBSD 1.4, 1.4.1, 1.4.2, 1.4.3:

The advisory will be updated to include instructions to remedy this problem for systems running the NetBSD-1.4 branch.

Cause:   Access control error, State error
Underlying OS:  UNIX (NetBSD)
Underlying OS Comments:  1.6 beta, 1.5.3, 1.5.2, 1.5.1, 1.5, 1.4.*

Message History:   This archive entry is a follow-up to the message listed below.
Jul 31 2002 'pppd' Race Condition in Chmod() Call May Allow Local Users to Obtain Root Privileges on the System



 Source Message Contents

Subject:  NetBSD Security Advisory 2002-010: symlink race in pppd



-----BEGIN PGP SIGNED MESSAGE-----


		 NetBSD Security Advisory 2002-010
		 =================================

Topic:		symlink race in pppd

Version:	NetBSD-current:	source prior to July 31, 2002
		NetBSD-1.6 beta: affected
		NetBSD-1.5.3:	affected
		NetBSD-1.5.2:	affected
		NetBSD-1.5.1:	affected
		NetBSD-1.5:	affected
		NetBSD-1.4.*:	affected

Severity:       Local user may be able to modify permissions on any file

Fixed:		NetBSD-current:		July 31, 2002
		NetBSD-1.6 branch:	not yet
		NetBSD-1.5 branch:	not yet
		NetBSD-1.4 branch:	not yet


Abstract
========

A race condition exists in the pppd program that may be exploited
in order to change the permissions of an arbitrary file.

A malicious local user may exploit the race condition to acquire write
permissions to a critical system file, and leverage the situation to
acquire escalated privileges.


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

The file specified as the tty device is opened by pppd, and the
permissions are recorded.  If pppd fails to initialize the tty
device in some way (such as a failure of tcgetattr(3)), then pppd
will attempt to restore the original permissions by calling chmod(2).
The call to chmod(2) is subject to a symlink race, so that the
permissions may be `restored' on some other file.


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

The following instructions describe how to upgrade your pppd
binaries by updating your source tree and rebuilding and
installing a new version of pppd.

* NetBSD-current:

	Systems running NetBSD-current dated from before 2002-07-30
	should be upgraded to NetBSD-current dated 2002-07-31 or later.

	The following directories need to be updated from the
	netbsd-current CVS branch (aka HEAD):
		usr.sbin/pppd

	To update from CVS, re-build, and re-install pppd:
		# cd src
		# cvs update -d -P usr.sbin/pppd

		# cd usr.sbin/pppd
		# make cleandir dependall
		# make install


* NetBSD 1.6 beta:

	The advisory will be updated to include instructions to remedy
	this problem for systems running the NetBSD-1.6 branch.


* NetBSD 1.5, 1.5.1, 1.5.2, 1.5.3:

	The advisory will be updated to include instructions to remedy
	this problem for systems running the NetBSD-1.5 branch.


* NetBSD 1.4, 1.4.1, 1.4.2, 1.4.3:

	The advisory will be updated to include instructions to remedy
	this problem for systems running the NetBSD-1.4 branch.



Thanks To
=========

Jun-ichiro itojun Hagino for patches, and preparing the advisory text.


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

	2002-08-01	Initial release


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

An up-to-date PGP signed copy of this release will be maintained at
  ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2002-010.txt.asc

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


Copyright 2002, The NetBSD Foundation, Inc.  All Rights Reserved.

$NetBSD: NetBSD-SA2002-010.txt.asc,v 1.1 2002/08/01 18:05:27 david Exp $

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org

iQCVAwUBPUk71D5Ru2/4N2IFAQFCLQQAhDzwXJacgTYJWlRGW56aFZuZE/5pyHh+
ccbWNS2ZwlpGEn7ucjlnEgRIN03VL3V4u3+N1HNXC2pb4gdqArP/6KcHMInydYIQ
X1BnXCL7xPG8hCrRzy9uorKeL+bgowC+uvPOUErW3y1LfPWhNQTNAjyHVIp5PFxS
zGHd/4U+aSI=
=otzW
-----END PGP SIGNATURE-----


 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2022, SecurityGlobal.net LLC