dell-wmi: Fix access out of memory
authorPali Rohár <pali.rohar@gmail.com>
Mon, 29 Sep 2014 13:10:51 +0000 (15:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Nov 2014 17:22:55 +0000 (09:22 -0800)
commit2a7978ef959430e21d93a6ab59284a11bc2c9bb6
tree9859a031ff9b4305ff32562f10769a329919046b
parenta2ad9bef40181939a8b3469a98f33775e4b0a23a
dell-wmi: Fix access out of memory

commit a666b6ffbc9b6705a3ced704f52c3fe9ea8bf959 upstream.

Without this patch, dell-wmi is trying to access elements of dynamically
allocated array without checking the array size. This can lead to memory
corruption or a kernel panic. This patch adds the missing checks for
array size.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/dell-wmi.c