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)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 11 May 2023 19:09:08 +0000 (12:09 -0700)
commit7b63a88bb62ba2ddf5fcd956be85fe46624628b9
treed8d66691811b461c793aba9f40e162a5b4d26571
parent20a99a291d564a559cc2fd013b4824a3bb3f1db7
Input: psmouse - fix OOB access in Elantech protocol

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>
drivers/input/mouse/elantech.c