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-2012.0546.2 - UPDATE [FreeBSD] kernel: Increased privileges - Existing account

Date: 20 June 2012
References: ESB-2012.0554.2  ESB-2012.0694  

Click here for printable version
Click here for PGP verifiable version
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                              ESB-2012.0546.2
              Privilege escalation when returning from kernel
                               20 June 2012

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

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           kernel
Publisher:         FreeBSD
Operating System:  FreeBSD
Impact/Access:     Increased Privileges -- Existing Account
                   Denial of Service    -- Existing Account
Resolution:        Patch/Upgrade
CVE Names:         CVE-2012-0217  

Original Bulletin: 
   http://security.freebsd.org/advisories/FreeBSD-SA-12:04.sysret.asc

Revision History:  June 20 2012: Corrected patch FreeBSD 8.1
                   June 13 2012: Initial Release

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

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

=============================================================================
FreeBSD-SA-12:04.sysret                                     Security Advisory
                                                          The FreeBSD Project

Topic:          Privilege escalation when returning from kernel

Category:       core
Module:         sys_amd64
Announced:      2012-06-12
Credits:        Rafal Wojtczuk, John Baldwin
Affects:        All supported versions of FreeBSD
Corrected:      2012-06-12 12:10:10 UTC (RELENG_7, 7.4-STABLE)
                2012-06-12 12:10:10 UTC (RELENG_7_4, 7.4-RELEASE-p9)
                2012-06-12 12:10:10 UTC (RELENG_8, 8.3-STABLE)
                2012-06-12 12:10:10 UTC (RELENG_8_3, 8.3-RELEASE-p3)
                2012-06-12 12:10:10 UTC (RELENG_8_2, 8.2-RELEASE-p9)
                2012-06-18 21:00:54 UTC (RELENG_8_1, 8.1-RELEASE-p12)
                2012-06-12 12:10:10 UTC (RELENG_9, 9.0-STABLE)
                2012-06-12 12:10:10 UTC (RELENG_9_0, 9.0-RELEASE-p3)
CVE Name:       CVE-2012-0217

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:http://security.FreeBSD.org/>.

0.   Revision History

v1.0  2012-06-12 Initial release.
v1.1  2012-06-19 Corrected patch FreeBSD 8.1.

I.   Background

The FreeBSD operating system implements a rings model of security, where
privileged operations are done in the kernel, and most applications
request access to these operations by making a system call, which puts
the CPU into the required privilege level and passes control to the
kernel.

II.  Problem Description

FreeBSD/amd64 runs on CPUs from different vendors.  Due to varying
behaviour of CPUs in 64 bit mode a sanity check of the kernel may be
insufficient when returning from a system call.

III. Impact

Successful exploitation of the problem can lead to local kernel privilege
escalation, kernel data corruption and/or crash.

To exploit this vulnerability, an attacker must be able to run code with user
privileges on the target system.

IV.  Workaround

No workaround is available.

However FreeBSD/amd64 running on AMD CPUs is not vulnerable to this
particular problem.

Systems with 64 bit capable CPUs, but running the 32 bit FreeBSD/i386
kernel are not vulnerable, nor are systems running on different
processor architectures.

V.   Solution

Perform one of the following:

1) Upgrade your vulnerable system to 7-STABLE, 8-STABLE, or 9-STABLE,
or to the RELENG_7_4, RELENG_8_3, RELENG_8_2, RELENG_8_1, or RELENG_9_0
security branch dated after the correction date.

2) To update your vulnerable system via a source code patch:

The following patches have been verified to apply to FreeBSD 7.4,
8.3, 8.2, 8.1 and 9.0 systems.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

[7.4, 8.3, 8.2, 9.0]
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret.patch
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret.patch.asc

[8.1]
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret-81.patch
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret-81.patch.asc

[8.1 if original sysret.patch has been applied]
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret-81-correction.patch
# fetch http://security.FreeBSD.org/patches/SA-12:04/sysret-81-correction.patch.asc

b) Apply the patch.

# cd /usr/src
# patch < /path/to/patch

c) Recompile your kernel as described in
<URL:http://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the
system.

3) To update your vulnerable system via a binary patch:

Systems running 7.4-RELEASE, 8.3-RELEASE, 8.2-RELEASE, 8.1-RELEASE,
or 9.0-RELEASE on the i386 or amd64 platforms can be updated via the
freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

VI.  Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.

CVS:

Branch                                                           Revision
  Path
- - -------------------------------------------------------------------------
RELENG_7
  src/sys/amd64/amd64/trap.c                                   1.319.2.14
RELENG_7_4
  src/UPDATING                                            1.507.2.36.2.11
  src/sys/conf/newvers.sh                                  1.72.2.18.2.14
  src/sys/amd64/amd64/trap.c                               1.319.2.12.2.2
RELENG_8
  src/sys/amd64/amd64/trap.c                                   1.332.2.24
RELENG_8_3
  src/UPDATING                                             1.632.2.26.2.5
  src/sys/conf/newvers.sh                                   1.83.2.15.2.7
  src/sys/amd64/amd64/trap.c                               1.332.2.21.2.2
RELENG_8_2
  src/UPDATING                                            1.632.2.19.2.11
  src/sys/conf/newvers.sh                                  1.83.2.12.2.14
  src/sys/amd64/amd64/trap.c                               1.332.2.14.2.2
RELENG_8_1
  src/UPDATING                                            1.632.2.14.2.15
  src/sys/conf/newvers.sh                                  1.83.2.10.2.16
  src/sys/amd64/amd64/trap.c                               1.332.2.10.2.3
RELENG_9
  src/sys/amd64/amd64/trap.c                                    1.357.2.9
RELENG_9_0
  src/UPDATING                                              1.702.2.4.2.5
  src/sys/conf/newvers.sh                                    1.95.2.4.2.7
  src/sys/amd64/amd64/trap.c                                1.357.2.2.2.3
- - -------------------------------------------------------------------------

Subversion:

Branch/path                                                      Revision
- - -------------------------------------------------------------------------
stable/7/                                                         r236953
releng/7.4/                                                       r236953
stable/8/                                                         r236953
releng/8.3/                                                       r236953
releng/8.2/                                                       r236953
releng/8.1/                                                       r237242
stable/9/                                                         r236953
releng/9.0/                                                       r236953
- - -------------------------------------------------------------------------

VII. References

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-0217

The latest revision of this advisory is available at
http://security.FreeBSD.org/advisories/FreeBSD-SA-12:04.sysret.asc
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9

iEYEARECAAYFAk/gjHQACgkQFdaIBMps37KutQCgkcp+lqFuJ3/fQKUemn80suW5
u/wAn2VLxY5LoUPNsN2eUHYB4GMz0AHl
=tQOk
- -----END PGP SIGNATURE-----

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

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
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 follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
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 author's website 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/render.html?cid=1980

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

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 member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQIVAwUBT+Erue4yVqjM2NGpAQLkVRAAkl+RbE1YmUib/FvhDidt1yjnvAoqMyS+
xfspkoC1j0NMvp9qmCLseQWUBOON29fd8sf3ckBYAWXY9v3LmFWsyK0KnH2gdVQ/
5kLffKdtDj/sUCHgsIceZ1wVdRS48s4hbyCea0Js99VG1CQ05YQdOLt842QeDCDf
i+BeQp37qV71hyAn/O9nkwwBcBGMp1mEXHYovNVC3YpKz/glSGp2KmLaBVNHjmRA
nbnQOLLXhHo9ZDPhGlAwKlunzuh8BY7Vkjg87A0PuWIHRb5yvzxUPlfaOFteWnSR
Nm2OiMKwYsX6TPmVrMFvqOPAqPWEME0IcPKV2qm9HjrXKSyL9DqmjFxuWdMj+riK
ZDfY2uDq7ElLAj4We7s5+6xKwAhtJJ2VoLyYYFKWTI27AE21lkyW0RZPDQ6hzPu5
QQE/wfZStQc8hr5ZnwAV2bRYe7OoNDOCO4D2yOT790vtZbnKRL0SOSgbgFwsTdDE
jwtVlWVnM1d3mvnoXVmWq5WMShupfMt0u7VkQ4Dr9V6QnarGggHn2z7bsiS6yi/4
UMstTnBiW0XxBLl1pHiIMCopc9Dy0NgKl10Wr/2q7cu/O3aA9Xcq1RGqwxhR+neF
3yZwtpnt8+K2gAjsd08PyahghCb8N57Qp6Zngi9G93cLswVb/aFmJKT/g3gLflYu
J1Jz+P6XM7o=
=rLQH
-----END PGP SIGNATURE-----