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:23:05 +0000 (09:23 -0800)
commitd07dd9bce7b90980393cecd372b08600e0f345de
treedffbac556420f097ff7cc72e5aa037bb192119fd
parent42d49f4525661181162386eea643275a5de10b59
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