Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

NetBSD Security Advisory 2010-003: azalia(4)/hdaudio(4) negative mixer index panic



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


                 NetBSD Security Advisory 2010-003
                 =================================

Topic:          azalia(4)/hdaudio(4) negative mixer index panic


Version:        NetBSD-current:         affected prior to 2010-01-21
                NetBSD 5.0.*:           affected
                NetBSD 5.0:             affected
                NetBSD 4.0.*:           affected
                NetBSD 4.0:             affected


Severity:       Local system crash


Fixed:          NetBSD-current:         Jan 21, 2010
                NetBSD-5-0 branch:      Jan 22, 2010
                NetBSD-5 branch:        Jan 22, 2010
                NetBSD-4-0 branch:      Jan 22, 2010
                NetBSD-4 branch:        Jan 22, 2010

Please note that NetBSD releases prior to 4.0 are no longer supported.
It is recommended that all users upgrade to a supported release.



Abstract
========

A signedness issue in the azalia(4) and hdaudio(4) drivers allows a
local attacker to cause a kernel panic.


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

The azalia_query_devinfo() function in azalia(4) and the
hdaudio_afg_set_port() function in hdaudio(4) incorrectly assume
the mixer index to be an unsigned integer, thus not checking for
negative values. Since the mixer index number is user specified,
any user with access to the mixer can cause an access to a negative
array index by specifying a negative mixer number, leading to a
kernel panic.

In order to exploit the vulnerability, the azalia(4) or hdaudio(4)
driver must be loaded and at least one azalia(4) or hdaudio(4)
device must be present in the machine and configured by the kernel


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

As a possible workaround, the azalia(4) and hdaudio(4) drivers can
be disabled. This can be achieved either by specifying the
configuration parameter at boot and disabling the device:

        boot> boot -c
        config> disable azalia
        config> disable hdaudio
        config> boot

or by commenting out the relevant sections of your kernel configuration
file:

        #azalia*        at pci? dev ? function ?        # High Definition Audio
        #hdaudio*       at pci? dev ? function ?        # High Definition Audio

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

Only kernels compiled with either of the following options are
vulnerable to this issue:

        azalia*        at pci? dev ? function ?
        hdaudio*       at pci? dev ? function ?

As a temporary workaround recompile the kernel with the above option 
commented out.  The default NetBSD GENERIC kernels have the azalia
option enabled, while hdaudio is disabled.

For all NetBSD versions, you need to obtain fixed kernel sources,
build, install the new kernel, and reboot the system.
                                      
The fixed source may be obtained from the NetBSD CVS repository.        
The following instructions briefly summarise how to upgrade your        
kernel.  In these instructions, replace:

  ARCH     with your architecture (from uname -m), and                  
  KERNCONF with the name of your kernel configuration file.    

To update from CVS, build, and install the kernel:

        # cd src
        # cvs update -d -P sys/dev/pci/azalia.c
        # cvs update -d -P sys/dev/pci/hdaudio/hdaudio_afg.c    # Except on 
NetBSD 4.x
        # ./build.sh kernel=KERNCONF
        # mv /netbsd /netbsd.old
        # cp sys/arch/ARCH/compile/obj/KERNCONF/netbsd /netbsd 
        # shutdown -r now

For more information on how to do this, see:    

   http://www.NetBSD.org/guide/en/chap-kernel.html


Thanks To
=========

Pierre Pronchery for finding and reporting the vulnerability as well as
providing a patch.


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

        2010-02-02      Initial release


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

Advisories may be updated as new information becomes available.
The most recent version of this advisory (PGP signed) can be found at 
  http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2010-003.txt.asc

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

Copyright 2010, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2010-003.txt,v 1.1 2010/02/02 19:18:36 tonnerre Exp $

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (NetBSD)

iQIcBAEBAgAGBQJLaHsAAAoJEAZJc6xMSnBuC+UQAJ5krxXjvCO/nx9uZiSg3Mj1
6aFvOn7ssEdp4ToqxsGHPBEBeOSUl/oUwrcS7LugcwVcXnCRHCl/9CnTso6PdFR4
TFG/dZXoDhyU1Q9yhE+eYFHU2xqD/qOngySyrHZtRfrcyEr53WN00FVzfkKK4H2Z
A/UWGoAAp+BnWeIMMGiozzud5rnvchMN/Zsjwa0lCxy45lmS8lHK7vQm0jMaEKsV
GrwejFc9gCRD6JkOz3A1sfg2Bo91/pxXcU6PZgSGrYXzQQcnyJw9zjAAqbk1A3Y3
Nh6X39aluGnuZKit2+vMYchgIv3vq1lS5y0hKHzt3jGqmL3ny5YOpwStKAxVIbWB
6GYfBZ6o6E6y/CrkIeINCQtizvfU4UXb522Si9P0Vb0sXlz34hCvkWyo8ReStAKM
2MsJha2w5dSk1ru2qmPfaIfiAru8cRLSpvnjEOOQF1Bfxfoj48Ue7jf4bljdc/IQ
tg2v/OqA7mAG/sl0w3TAq6kzeGq6Y7Qm9eoOTFuPM4QVZOIr5a/rB0XYttkRw1RP
/3QKpahvnB/AbpavonxmF/YosR4BM5+Ufp+Y0FmmVyWgAWR/TM77Wri3EpJbjbhy
VWtVwNdjCMRlVvg2HUBHk4+k/6c3OmaxT8LYnph8r+EcdI8HotgQU5PZUJKPhmq0
pCwHOw0bwvrHhZQrzDVq
=QM1W
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index