OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Apr 2017 09:05:03 +0000 (11:05 +0200)
commit1bb9914e1730417d530de9ed37e59efdc647146b
tree86657e8ac8ebd75547ee47dd558b6ff360228857
parent2f86a96be0ccb1302b7eee7855dbee5ce4dc5dfb
cdc-acm: fix possible invalid access when processing notification

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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c