From: Jiri Kosina Date: Thu, 21 Aug 2014 14:56:47 +0000 (-0500) Subject: HID: logitech: fix bounds checking on LED report size X-Git-Tag: omap-for-v3.17/fixes-against-rc2~28^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51217e69697fba92a06e07e16f55c9a52d8e8945;p=pandora-kernel.git HID: logitech: fix bounds checking on LED report size The check on report size for REPORT_TYPE_LEDS in logi_dj_ll_raw_request() is wrong; the current check doesn't make any sense -- the report allocated by HID core in hid_hw_raw_request() can be much larger than DJREPORT_SHORT_LENGTH, and currently logi_dj_ll_raw_request() doesn't handle this properly at all. Fix the check by actually trimming down the report size properly if it is too large. Cc: stable@vger.kernel.org Reported-by: Ben Hawkes Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed