]> git.baikalelectronics.ru Git - kernel.git/commit
Input: add bounds checking to input_set_capability()
authorJeff LaBundy <jeff@labundy.com>
Mon, 21 Mar 2022 04:55:27 +0000 (21:55 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 21 Mar 2022 04:59:42 +0000 (21:59 -0700)
commitd239cd3470e6f5e9e164dde65b0afd466a761026
tree943674074c63d4dc8c72512007b10e22abde3017
parentd9ab4eeeaebf2095fbaf2e5c54b0236c6a729115
Input: add bounds checking to input_set_capability()

Update input_set_capability() to prevent kernel panic in case the
event code exceeds the bitmap for the given event type.

Suggested-by: Tomasz Moń <tomasz.mon@camlingroup.com>
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Tomasz Moń <tomasz.mon@camlingroup.com>
Link: https://lore.kernel.org/r/20220320032537.545250-1-jeff@labundy.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/input.c