s390/keyboard: sanitize array index in do_kdsk_ioctl
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 19 Jul 2018 08:27:33 +0000 (10:27 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 19 Jul 2018 14:37:30 +0000 (16:37 +0200)
commit054732837c312c6007994badbc86b0976b228f77
tree60cc433b2c29fc4b249ddb9c9f6badbe1fc1d223
parentaeaf7002a76c8da60c0f503badcbddc07650678c
s390/keyboard: sanitize array index in do_kdsk_ioctl

The kbd_ioctl uses two user controlled indexes for KDGKBENT/KDSKBENT.
Use array_index_nospec to prevent any out of bounds speculation.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/keyboard.c