Multiple BSD Vendor exec() Ptrace Race Condition Vulnerability
BID:2873
Info
Multiple BSD Vendor exec() Ptrace Race Condition Vulnerability
| Bugtraq ID: | 2873 |
| Class: | Race Condition Error |
| CVE: | |
| Remote: | No |
| Local: | Yes |
| Published: | Jun 14 2001 12:00AM |
| Updated: | Jun 14 2001 12:00AM |
| Credit: | Published by Georgi Guninski <[email protected]> on June 14, 2001. |
| Vulnerable: |
OpenBSD OpenBSD 2.9 OpenBSD OpenBSD 2.8 NetBSD NetBSD 1.5 NetBSD NetBSD 1.4.3 NetBSD NetBSD 1.4.2 NetBSD NetBSD 1.4.1 |
| Not Vulnerable: | |
Discussion
Multiple BSD Vendor exec() Ptrace Race Condition Vulnerability
Ptrace is a facility used mostly by debuggers that allows one process to attach to another and monitor/modify its execution state and memory.
Ptrace implements checks to ensure that unprivileged processes do not attach to privileged ones. It has been reported that a race condition exists in some BSD ptrace implementations that may cause these checks to by bypassed.
Due to this vulnerability, an unprivileged process may be able to attach to a privileged process. This may allow local attackers to elevate privileges.
OpenBSD and NetBSD have both confirmed that they are vulnerable. OpenBSD has released kernel patches, while NetBSD has fixed the problem in their CVS tree.
Ptrace is a facility used mostly by debuggers that allows one process to attach to another and monitor/modify its execution state and memory.
Ptrace implements checks to ensure that unprivileged processes do not attach to privileged ones. It has been reported that a race condition exists in some BSD ptrace implementations that may cause these checks to by bypassed.
Due to this vulnerability, an unprivileged process may be able to attach to a privileged process. This may allow local attackers to elevate privileges.
OpenBSD and NetBSD have both confirmed that they are vulnerable. OpenBSD has released kernel patches, while NetBSD has fixed the problem in their CVS tree.
Solution / Fix
Multiple BSD Vendor exec() Ptrace Race Condition Vulnerability
Solution:
OpenBSD has released kernel patches that will eliminate this vulnerability for versions 2.8 and 2.9. Administrators are advised to build and boot new kernels after applying these fixes.
NetBSD has fixed this vulnerability in their main source tree and has made patches available for 1.4 and 1.5 based systems.
NetBSD NetBSD 1.4.1
NetBSD NetBSD 1.4.2
NetBSD NetBSD 1.4.3
NetBSD NetBSD 1.5
OpenBSD OpenBSD 2.8
OpenBSD OpenBSD 2.9
Solution:
OpenBSD has released kernel patches that will eliminate this vulnerability for versions 2.8 and 2.9. Administrators are advised to build and boot new kernels after applying these fixes.
NetBSD has fixed this vulnerability in their main source tree and has made patches available for 1.4 and 1.5 based systems.
NetBSD NetBSD 1.4.1
-
NetBSD 1.4 SA2001-009-ptrace-1.4.patch
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2001-009-ptrace-1.4 .patch
NetBSD NetBSD 1.4.2
-
NetBSD 1.4 SA2001-009-ptrace-1.4.patch
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2001-009-ptrace-1.4 .patch
NetBSD NetBSD 1.4.3
-
NetBSD 1.4 SA2001-009-ptrace-1.4.patch
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2001-009-ptrace-1.4 .patch
NetBSD NetBSD 1.5
-
NetBSD 1.5 SA2001-009-ptrace-1.5.patch
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2001-009-ptrace-1.5 .patch
OpenBSD OpenBSD 2.8
-
OpenBSD 2.8 030_kernexec.patch
ftp://ftp.openbsd.org/pub/OpenBSD/patches/2.8/common/030_kernexec.patc h
OpenBSD OpenBSD 2.9
-
OpenBSD 2.9 007_kernexec.patch
ftp://ftp.openbsd.org/pub/OpenBSD/patches/2.9/common/007_kernexec.patc h