]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Input: gtco - fix crash on detecting device without endpoints
authorVladis Dronov <vdronov@redhat.com>
Thu, 31 Mar 2016 17:53:42 +0000 (10:53 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 31 Mar 2016 20:10:00 +0000 (13:10 -0700)
commit162f98dea487206d9ab79fc12ed64700667a894d
tree8096aa47a878805cb4b98ae08599b2ef32671edf
parentd314e9e80c5ea561b73584b73806c2ae9e30f503
Input: gtco - fix crash on detecting device without endpoints

The gtco driver expects at least one valid endpoint. If given malicious
descriptors that specify 0 for the number of endpoints, it will crash in
the probe function. Ensure there is at least one endpoint on the interface
before using it.

Also let's fix a minor coding style issue.

The full correct report of this issue can be found in the public
Red Hat Bugzilla:

https://bugzilla.redhat.com/show_bug.cgi?id=1283385

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>
drivers/input/tablet/gtco.c