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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: NetBSD Security Officer
Date: Wednesday, February 3, 2010 - 6:02 am

-----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-----
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Promote BSD and Share the Wealth, Chris Coleman, (Thu Apr 18, 4:38 pm)
New Developers, Jan Schaumann, (Mon Jul 1, 2:55 pm)
NetBSD now has native pthreads!, Jan Schaumann, (Sun Jan 19, 3:14 pm)
anoncvs service unavailable until further notice, Christos Zoulas, (Thu Dec 23, 11:27 am)
Timelines for upcoming releases, James Chacon, (Mon May 2, 3:51 pm)
NetBSD Security Advisory 2005-001: Crypto leaks across Hyp ..., NetBSD Security-Officer, (Thu Jun 30, 3:12 pm)
cvsweb offline, SODA Noriyuki, (Thu Aug 11, 7:46 am)
Announcing update 2.0.3 - source only, James Chacon, (Mon Oct 31, 8:52 am)
[ANNOUNCE] pkgsrc-users mailing list, Johnny C. Lam, (Thu Feb 23, 4:47 pm)
NetBSD Security Advisory 2006-007: mail(1) creates record ..., NetBSD Security-Officer, (Wed Mar 29, 6:31 pm)
NetBSD Security Advisory 2006-011: IPSec replay attack, NetBSD Security-Officer, (Wed Apr 12, 7:33 pm)
Announcing the release of NetBSD 3.0.1, Matthias Scheler, (Mon Jul 24, 11:02 am)
Organizational Changes to the NetBSD Project, Alistair Crooks, (Fri Sep 1, 12:36 am)
NetBSD Security Advisory 2007-007: BIND cryptographically ..., NetBSD Security-Officer, (Thu Sep 13, 2:56 pm)
NetBSD Security Advisory 2008-003: IPsec in IPv6 Denial of ..., NetBSD Security-Officer, (Thu Feb 28, 4:37 pm)
Summer of Code student applications period extended, Jan Schaumann, (Tue Apr 1, 10:36 pm)
The pkgsrc-2008Q2 Release, Alistair Crooks, (Sat Jul 26, 12:45 am)
NetBSD developer's summit and hackathon, Jan Schaumann, (Sat Oct 4, 11:02 am)
NetBSD 5.0_RC2 binaries available for download, Soren Jacobsen, (Tue Feb 10, 8:43 pm)
Announcing NetBSD 5.0, Soren Jacobsen, (Wed Apr 29, 2:49 pm)
NetBSD Security Advisory 2009-010: ISC dhclient subnet-mas ..., NetBSD Security Officer, (Tue Jul 14, 2:31 pm)
NetBSD Security Advisory 2010-003: azalia(4)/hdaudio(4) ne ..., NetBSD Security Officer, (Wed Feb 3, 6:02 am)