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)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:12:42 +0000 (13:12 +0000)
commit9dd19833c4cf27da3513e2dd87b2c447875b9540
tree006724d1ada9ff5b59a334a329d9d43290201873
parent431d0946623d16020bfb3e5a17b73e8bc209412f
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>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/input/misc/ati_remote2.c