copyright | disclaimer | privacy | contact  
Australia's Leading Computer Emergency Response Team
 
Search this site

 
On this site

 > HOME
 > About AusCERT
 > Membership
 > Contact Us
 > PKI Services
 > Training
 > Publications
 > Sec. Bulletins
 > Conferences
 > News & Media
 > Services
 > Web Log
 > Site Map
 > Site Help
 > Member login





 

ESB-1999.135 -- FreeBSD-SA-99:02 -- Profiling Across Exec Calls

Date: 09 September 1999

Click here for printable version
Click here for PGP verifiable version
-----BEGIN PGP SIGNED MESSAGE-----

==========================================================================
              AUSCERT External Security Bulletin Redistribution
                             
                      ESB-1999.135 -- FreeBSD-SA-99:02
                         Profiling Across Exec Calls
                              09 September 1999

===========================================================================

The FreeBSD Security Team has released the following advisory concerning
a vulnerability in the kernel's profiling implementation.  This
vulnerability may allow local users to gain root access.  No attacks using
this vulnerability are known at this time.

- --------------------------BEGIN INCLUDED TEXT--------------------

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

=============================================================================
FreeBSD-SA-99:02                                            Security Advisory
                                                                FreeBSD, Inc.

Topic:          Profiling Across Exec Calls

Category:       core
Module:         kernel
Announced:      1999-09-04
Affects:        FreeBSD 3.2 (and earlier)
		FreeBSD-current before the correction date.
Corrected:      FreeBSD-3.3 RELEASE
		FreeBSD-current as of August 11, 1999
		FreeBSD-3.2-stable as of August 22, 1999
FreeBSD only:   No

Patches:        ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-99:02/

I.   Background

FreeBSD provides a mechanism to profile a running executable to aid in
performance tuning.  This can be accomplished via a kernel mechanism
to statistically sample the program counter of the program under
profile.

II.  Problem Description

A flaw exists in the implementation which allows an attacker to cause
arbitrary locations in program executed by the attacker.

III. Impact

No attacks against using this vulnerability this are known at this
time.  An attacker could theoretically gain root access from a
carefully crafted attack.

IV.  Workaround

Since profiling is done in the kernel via the profil(2) system call,
one must patch the kernel so no workaround is possible.

V.   Solution

Apply the following patch.  It will apply to both FreeBSD-current before
the resolution date and to 3.2-stable before the resolution date.

    Index: kern_exec.c
    ===================================================================
    RCS file: /home/imp/FreeBSD/CVS/src/sys/kern/kern_exec.c,v
    retrieving revision 1.99
    retrieving revision 1.100
    diff -u -r1.99 -r1.100
    --- kern_exec.c	1999/04/27 11:15:55	1.99
    +++ kern_exec.c	1999/08/11 20:35:38	1.100
    @@ -228,6 +228,9 @@
     		fdfree(p);
     		p->p_fd = tmp;
     	}
    +
    +	/* Stop profiling */
    +	stopprofclock(p);
     
     	/* close files on exec */
     	fdcloseexec(p);


=============================================================================
FreeBSD, Inc.

Web Site:                       http://www.freebsd.org/
Confidential contacts:          security-officer@freebsd.org
Security notifications:         security-notifications@freebsd.org
Security public discussion:     freebsd-security@freebsd.org
PGP Key:                ftp://ftp.freebsd.org/pub/FreeBSD/CERT/public_key.asc

Notice: Any patches in this document may not apply cleanly due to
        modifications caused by digital signature or mailer software.
        Please reference the URL listed at the top of this document
        for original copies of all patches if necessary.
=============================================================================

- -----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBN9Cut1UuHi5z0oilAQE7IgP/Rg5oAQkmI/Wzcp5x3xWlomDAQQJFVlXp
7X9q6yux0Gx2fLU+1TcPS+dD6S7UOcDBgMMHXGqVNDnGJZSoRDIe7pNioZ/ZHVbT
uh51tJBHscumrvgU2HbHcgtxLmmzlwWByf2J6UKWMLlZXWy9ieZRVTug7Zl977OM
NXmKDU2au/Y=
=RCXc
- -----END PGP SIGNATURE-----

- --------------------------END INCLUDED TEXT--------------------

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content.  The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It will
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

	http://www.auscert.org.au/Information/advisories.html

If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Teams).

Internet Email: auscert@auscert.org.au
Facsimile:	(07) 3365 7031
Telephone:	(07) 3365 4417 (International: +61 7 3365 4417)
		AusCERT personnel answer during Queensland business hours
		which are GMT+10:00 (AEST).
		On call after hours for emergencies.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key

iQCVAwUBN+dwHCh9+71yA2DNAQG+cAP/WAxGhBV1p0A2qAYbwmsUD3qd3gaMTw+0
F4K4hDn0sBTCeXYG76p2nDpjrHO5ruqeOJigkYCyJxYJOwLWuutcxX9JUg3iKya/
nmnBwtI1UrJP6Kqsi/IptfJnb85rqaj4nf9oY+VNXtyLbA/fxpz1RpnmFgU4qII+
smszl45WUuE=
=5HsW
-----END PGP SIGNATURE-----