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

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.


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

        #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
        # ./ 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:

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

Information about NetBSD and NetBSD security can be found at and .

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 $

Version: GnuPG v1.4.10 (NetBSD)


Home | Main Index | Thread Index | Old Index