linux/arch/parisc
Helge Deller e3957bc637 parisc: Fix out of array access in match_pci_device()
commit 615b2665fd upstream.

As found by the ubsan checker, the value of the 'index' variable can be
out of range for the bc[] array:

UBSAN: Undefined behaviour in arch/parisc/kernel/drivers.c:655:21
index 6 is out of range for type 'char [6]'
Backtrace:
 [<104fa850>] __ubsan_handle_out_of_bounds+0x68/0x80
 [<1019d83c>] check_parent+0xc0/0x170
 [<1019d91c>] descend_children+0x30/0x6c
 [<1059e164>] device_for_each_child+0x60/0x98
 [<1019cd54>] parse_tree_node+0x40/0x54
 [<1019d86c>] check_parent+0xf0/0x170
 [<1019d91c>] descend_children+0x30/0x6c
 [<1059e164>] device_for_each_child+0x60/0x98
 [<1019d938>] descend_children+0x4c/0x6c
 [<1059e164>] device_for_each_child+0x60/0x98
 [<1019cd54>] parse_tree_node+0x40/0x54
 [<1019cffc>] hwpath_to_device+0xa4/0xc4

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-10-21 08:45:01 +01:00
..
configs USB: remove CONFIG_USB_DEBUG from defconfig files 2014-05-28 09:40:45 -07:00
hpux execve: use 'struct filename *' for executable name passing 2014-02-05 12:54:53 -08:00
include parisc: drop _PAGE_FILE and pte_file()-related helpers 2018-10-03 04:09:56 +01:00
kernel parisc: Fix out of array access in match_pci_device() 2018-10-21 08:45:01 +01:00
lib parisc: Unbreak handling exceptions from kernel modules 2016-05-01 00:06:10 +02:00
math-emu parisc: remove duplicate define 2013-11-07 22:28:15 +01:00
mm parisc: Report SIGSEGV instead of SIGBUS when running out of stack 2017-10-12 15:27:59 +01:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh parisc: make "make install" not depend on vmlinux 2013-11-07 22:28:06 +01:00
Kconfig Merge branch 'parisc-3.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2014-05-20 14:35:28 +09:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile parisc: Only use -mfast-indirect-calls option for 32-bit kernel builds 2014-10-05 13:41:08 -07:00
nm Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00