cdc-acm: fix possible invalid access when processing notification
authorTobias Herzog <t-herzog@gmx.de>
Thu, 30 Mar 2017 20:15:10 +0000 (22:15 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Aug 2017 01:13:58 +0000 (02:13 +0100)
commit16f2c3dd6aa662eee6f896d8240153d12aed5ba3
tree0b3596cb6cedd7de25490f1200f264421094b4c5
parentd3104d983465e23fb059cd32d34e8e35a8860fd2
cdc-acm: fix possible invalid access when processing notification

commit 1bb9914e1730417d530de9ed37e59efdc647146b upstream.

Notifications may only be 8 bytes long. Accessing the 9th and
10th byte of unimplemented/unknown notifications may be insecure.
Also check the length of known notifications before accessing anything
behind the 8th byte.

Signed-off-by: Tobias Herzog <t-herzog@gmx.de>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/class/cdc-acm.c