greybus: firmware: fix information leak
authorJohan Hovold <johan@hovoldconsulting.com>
Thu, 19 Nov 2015 17:27:59 +0000 (18:27 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 20 Nov 2015 00:07:48 +0000 (16:07 -0800)
commit98645a9c69f40e46cdbf8c0c1862b4c2ed470319
tree1c0031f64678ab9059652702d2b59b06ae011c1c
parent81ad6994611706270bc68a8dd951d7c69e2ed175
greybus: firmware: fix information leak

Add missing sanity checks on get_firmware-request offset and size
parameters to fix potential information leaks.

This prevents remotely controlled information leaks as the requestor
currently controls both the 32-bit firmware-image offset and the amount
of data that is returned (up to host-device MTU).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/firmware.c