Re: [PATCH 1/2] Staging: bcm: Fix an invalid dereference to a kmalloc in IOCTL_BCM_BULK_WRM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 17, 2011 at 11:53:37AM -0500, Kevin McKinney wrote:
> 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 <klmckinney1@xxxxxxxxx>

Looks good.

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux