search menu icon-carat-right cmu-wordmark

CERT Coordination Center

ptrace contains vulnerability allowing for local root compromise

Vulnerability Note VU#628849

Original Release Date: 2004-04-16 | Last Revised: 2004-04-30

Overview

A vulnerability in the Linux 2.2 and 2.4 distributions of ptrace() may permit a local attacker to gain elevated privileges.

Description

The Linux 2.2 and 2.4 kernels contained a flaw in ptrace(). This vulnerability may permit a local user to have the kernel spawn a child process. From the man page:

The ptrace system call provides a means by which a parent process may observe and control the execution of another process, and examine and change its core image and registers. It is primarily used to implement breakpoint debugging and system call tracing.


If the kernel is built with modules and kernel module loader enabled and /proc/sys/kernel/modprobe contains the path to a valid executable and ptrace() calls are not blocked, then a local user may be able to exploit this vulnerability to gain root privileges to the system.

The CERT/CC has seen active exploitation of this vulnerability.

Impact

A local user can exploit this vulnerability to gain elevated privileges, typically root.

Solution

This vulnerability has been resolved in Linux 2.2.25 and 2.4.21. Various vendors have also released advisories and updates. Please see the your vendor's advisory for more details.

Vendor Information

628849
 
Affected   Unknown   Unaffected

Conectiva

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see http://distro.conectiva.com.br/atualizacoes/index.php?id=a&anuncio=000618&idioma=en.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Debian

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see http://www.debian.org/security/2003/dsa-270.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Gentoo

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

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

- - ---------------------------------------------------------------------
GENTOO LINUX SECURITY ANNOUNCEMENT 200303-17
- - ---------------------------------------------------------------------

PACKAGE : kernel
SUMMARY : ptrace flaw
DATE : 2003-03-21 08:59 UTC
EXPLOIT : local
VERSIONS AFFECTED : All except 2.5
FIXED VERSION : Kernels with patch applied
CVE : CAN-2003-0127

- - ---------------------------------------------------------------------

- From advisory:

"The Linux 2.2 and Linux 2.4 kernels have a flaw in ptrace. This hole
allows local users to obtain full privileges. Remote exploitation of
this hole is not possible. Linux 2.5 is not believed to be vulnerable."

Read the full advisory at:
http://marc.theaimsgroup.com/?l=linux-kernel&m=104791735604202&w=2

SOLUTION

It is recommended that all Gentoo Linux users upgrade their kernels.

If you are running any of gentoo-sources, gs-sources, pfeifer-sources
sparc-sources or xfs-sources updates are available. Sync your tree and
run emerge <package> to install the latest version of the package. Then
compile and install your new kernel and reboot.

If you are using an other kernel package which hasn't been updated or
download your own sources you can download a patch from
http://cvs.gentoo.org/~aliz/linux-2.4.20-ptrace.patch
and manually patch your kernel.

- - ---------------------------------------------------------------------
aliz@gentoo.org - GnuPG key is available at http://cvs.gentoo.org/~aliz
- - ---------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+etRofT7nyhUpoZMRAtj9AKCpcSvx893bgbEGVjZ8jExLNh3oHwCgvizk
D3X8W7ZFcZ8flX9KD3Qm0ps=
=ZiW+
-----END PGP SIGNATURE-----

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Guardian Digital Inc.

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

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


+------------------------------------------------------------------------+
| EnGarde Secure Linux Security Advisory March 18, 2003 |
| http://www.engardelinux.org/ ESA-20030318-009 |
| |
| Package: kernel |
| Summary: several vulnerabilities. |
+------------------------------------------------------------------------+

EnGarde Secure Linux is a secure distribution of Linux that features
improved access control, host and network intrusion detection, Web
based secure remote management, e-commerce, and integrated open source
security tools.

OVERVIEW
- --------
This update fixes several vulnerabilities in the Linux kernel.

CAN-2002-1380
-------------
Local users could cause a denial of service by using the mmap()
function with the PROT_READ parameter to access memory pages via the
/proc/pid/mem interface.

CAN-2003-0001
-------------
Most of the Ethernet card (NIC) device drivers did not pad frames with
null bytes, leading to the potential leakage of kernel memory.

CAN-2003-0127
-------------
There is a vulnerability in the kernel module loader which could
allow a local attacker to obtain root privileges by using ptrace to
attach to a child process spawned by the kernel when a new module is
loaded.

The Common Vulnerabilities and Exposures project (cve.mitre.org) has
assigned the names CAN-2002-1380, CAN-2003-0001, and CAN-2003-0127 to
these issues.

All users are recommended to upgrade immediately using the special
SOLUTION in this advisory.

SOLUTION
- --------
Users of the EnGarde Professional edition can use the Guardian Digital
Secure Network to update their systems automatically.

EnGarde Community users should upgrade to the most recent version
as outlined in this advisory. Updates may be obtained from:

ftp://ftp.engardelinux.org/pub/engarde/stable/updates/
http://ftp.engardelinux.org/pub/engarde/stable/updates/

Please read and understand this entire section before you attempt to
upgrade the kernel.

Initial Steps
-------------
1) Verify the machine is either:

a) booted into a "standard" kernel; or
b) LIDS is disabled (/sbin/lidsadm -S -- -LIDS_GLOBAL)

2) Determine which kernels you currently have installed:

# rpm -qa --qf "%{NAME}\" | grep kernel

3) Download the new kernels that match what you have installed
(based on step 2) from the "UPDATED PACKAGES" section of this
advisory.

Installation Steps
------------------
4) Install the new packages. The packages will automagically
update /etc/lilo.conf by commenting out any old EnGarde images
and replacing them with the new ones:

# rpm --replacefiles -i kernel1 kernel2 ...

5) Re-run LILO. If you see any errors then open /etc/lilo.conf in
your favorite text editor and make the appropriate changes:

# /sbin/lilo

Final Steps
-----------
6) If you did not see any LILO errors then your new kernel is now
installed and your machine is ready to be rebooted:

# reboot

UPDATED PACKAGES
- ----------------
These updated packages are for EnGarde Secure Linux Community
Edition.

Source Packages:

SRPMS/kernel-2.2.19-1.0.30.src.rpm
MD5 Sum: 5385352091faa056106dc1e92f7af7c1

Binary Packages:

i386/kernel-2.2.19-1.0.30.i386.rpm
MD5 Sum: 9a16886321cc19365ea1a7d27d927b83

i386/kernel-lids-mods-2.2.19-1.0.30.i386.rpm
MD5 Sum: 784e3abd25e27db6036bd7638ac22ef6

i386/kernel-smp-lids-mods-2.2.19-1.0.30.i386.rpm
MD5 Sum: 42a9c7d7b5879e061d59d1008011dab7

i386/kernel-smp-mods-2.2.19-1.0.30.i386.rpm
MD5 Sum: 64b89dcd411abdd455bbb55539a29df6


i686/kernel-2.2.19-1.0.30.i686.rpm
MD5 Sum: af21a043fcde3004ad645ca4bb26117e

i686/kernel-lids-mods-2.2.19-1.0.30.i686.rpm
MD5 Sum: 8f90859a9313f731c710247e27915a42

i686/kernel-smp-lids-mods-2.2.19-1.0.30.i686.rpm
MD5 Sum: 74ff5e04d89e9a5b60d79f3fc0491034

i686/kernel-smp-mods-2.2.19-1.0.30.i686.rpm
MD5 Sum: 1fa7cffecc2fd417713f67c4bb19da90

REFERENCES
- ----------
Guardian Digital's public key:
http://ftp.engardelinux.org/pub/engarde/ENGARDE-GPG-KEY

Official Web Site of the Linux Kernel:
http://www.kernel.org/

Security Contact: security@guardiandigital.com
EnGarde Advisories: http://www.engardelinux.org/advisories.html

- --------------------------------------------------------------------------
$Id: ESA-20030318-009-kernel,v 1.2 2003/03/18 15:35:22 rwm Exp $
- --------------------------------------------------------------------------
Author: Ryan W. Maple <ryan@guardiandigital.com>
Copyright 2003, Guardian Digital, Inc.

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

iD8DBQE+dz2sHD5cqd57fu0RAuvSAJ9lXxgMrxLUL4dbJN0LhFrqjIXMzACgmPyD
pgl8KGYszwaCO5uGbL7laZs=
=XrzW
-----END PGP SIGNATURE-----

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Linux Kernel Archives

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see http://marc.theaimsgroup.com/?l=linux-kernel&m=104791735604202&w=2

If you have feedback, comments, or additional information about this vulnerability, please send us email.

MandrakeSoft

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2003:039.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Red Hat Inc.

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see https://rhn.redhat.com/errata/RHSA-2003-098.html.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

SCO

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see ftp://ftp.sco.com/pub/security/OpenLinux/CSSA-2003-020.0.txt.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Slackware

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see http://slackware.com/security/viewer.php?l=slackware-security&y=2003&m=slackware-security.522012.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

SuSE Inc.

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see http://www.suse.com/de/security/2003_21_kernel.html.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Trustix

Updated:  April 16, 2004

Status

  Vulnerable

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see http://www.trustix.net/errata/misc/2003/TSL-2003-0007-kernel.asc.txt.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

View all 11 vendors View less vendors


CVSS Metrics

Group Score Vector
Base N/A N/A
Temporal N/A N/A
Environmental N/A

References

Acknowledgements

Thanks to Andrzej Szombierski for reporting this vulnerability.

This document was written by Jason A Rafail and is based on information provided by Andrzej Szombierski

Other Information

CVE IDs: CVE-2003-0127
Severity Metric: 14.25
Date Public: 2003-03-17
Date First Published: 2004-04-16
Date Last Updated: 2004-04-30 18:44 UTC
Document Revision: 9

Sponsored by the Department of Homeland Security Office of Cybersecurity and Communications.