Input: psmouse - fix OOB access in Elantech protocol
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 11 May 2023 19:08:37 +0000 (12:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2023 09:15:23 +0000 (11:15 +0200)
commitf9172a0bb57d62a42122075a124c071a1c56e455
tree460016a33e724e93706ce03bf80eca0511ba732e
parent00b59734f50421cd5e4d4b1fc06ee07961a6dd76
Input: psmouse - fix OOB access in Elantech protocol

commit 7b63a88bb62ba2ddf5fcd956be85fe46624628b9 upstream.

The kernel only allocate 5 MT slots; check that transmitted slot ID
falls within the acceptable range.

Link: https://lore.kernel.org/r/ZFnEL91nrT789dbG@google.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/mouse/elantech.c