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)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 08:42:47 +0000 (10:42 +0200)
commit0db38337a504f9b783e7244703b8c090f8cbf2ad
tree9a4e2d5e03adcef9256daa4aa42c869a689d9350
parentda23ec55b4ee3bd1c2e9ae2f89aea163e74b1887
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