Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
authorVladis Dronov <vdronov@redhat.com>
Wed, 23 Mar 2016 18:53:46 +0000 (11:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 16:09:04 +0000 (09:09 -0700)
commita1d0a23831ccde9dbd5279a5d45790a96f18ad32
tree3b039a247beee551581611ec5a2284a6480dcd13
parentaf18c4ca4b1728e2149844656bbf1aa8d7382682
Input: ati_remote2 - fix crashes on detecting device with invalid descriptor

commit 950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d upstream.

The ati_remote2 driver expects at least two interfaces with one
endpoint each. If given malicious descriptor that specify one
interface or no endpoints, it will crash in the probe function.
Ensure there is at least two interfaces and one endpoint for each
interface before using it.

The full disclosure: http://seclists.org/bugtraq/2016/Mar/90

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/misc/ati_remote2.c