android_kernel_oneplus_msm8998/arch/parisc
Helge Deller 8778f3e6e3 parisc: Fix out of array access in match_pci_device()
commit 615b2665fd20c327b631ff1e79426775de748094 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>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-24 09:32:03 +02:00
..
configs rtmutex: Delete scriptable tester 2015-07-20 11:45:45 +02:00
include parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel 2018-01-10 09:27:12 +01:00
kernel parisc: Fix out of array access in match_pci_device() 2018-04-24 09:32:03 +02:00
lib parisc: Unbreak handling exceptions from kernel modules 2016-04-20 15:41:52 +09: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-07-21 07:44:56 +02:00
oprofile
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 parisc: Add Huge Page and HUGETLBFS support 2015-11-22 12:23:10 +01:00
Kconfig.debug
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:07:08 -08:00
nm