From: Kevin McKinney Date: Sat, 17 Dec 2011 16:53:37 +0000 (-0500) Subject: Staging: bcm: Fix an invalid dereference to a kmalloc in IOCTL_BCM_BULK_WRM X-Git-Tag: v3.3-rc1~152^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=221fd753dd002222b595f8af0e289fff0c9cf5a8;p=pandora-kernel.git Staging: bcm: Fix an invalid dereference to a kmalloc in IOCTL_BCM_BULK_WRM Variable IoBuffer.InputLength is chosen from userspace, and can therefore be less than the intended size. In this case,the memory from the kmalloc call is eventually cast to a PBULKWRM_BUFFER. If the IoBuffer.InputLength does not meet the minimum size of PBULKWRM_BUFFER, then we will get a kernel Oops. To resolve this issue, this patch verifies IoBuffer.InputLength meets the minimum size before invoking the kmalloc call. Signed-off-by: Kevin McKinney Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed