USB: cxacru: potential underflow in cxacru_cm_get_array()
authorDan Carpenter <dan.carpenter@oracle.com>
Sun, 19 May 2013 18:52:20 +0000 (21:52 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 30 May 2013 13:35:04 +0000 (14:35 +0100)
commite75b61897276c5100e61c9c74fd55ded28f31431
tree21bd956cf16906b6b39e9097a6c6ef776f440e08
parentcba40e7f42e477750bd1bf63ec8337b6f65a9baf
USB: cxacru: potential underflow in cxacru_cm_get_array()

commit 2a0ebf80aa95cc758d4725f74a7016e992606a39 upstream.

The value of "offd" comes off the instance->rcv_buf[] and we used it as
the offset into an array.  The problem is that we check the upper bound
but not for negative values.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/atm/cxacru.c