Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
commit4b586dc3d736a43659acb575c90d33370ba2fb0d
authorVladis Dronov <vdronov@redhat.com>
Wed, 23 Mar 2016 18:53:46 +0000 (23 11:53 -0700)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 18 Apr 2016 12:51:08 +0000 (18 08:51 -0400)
treec438a50ab4641971032ae656fe8296639f714e7c
parent9f1aa2840b8f95558470720572f10bd3b046100f
Input: ati_remote2 - fix crashes on detecting device with invalid descriptor

[ Upstream commit 950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d ]

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: Sasha Levin <sasha.levin@oracle.com>
drivers/input/misc/ati_remote2.c