Input: add safety guards to input_set_keycode()
If we happen to have a garbage in input device's keycode table with values too big we'll end up doing clear_bit() with offset way outside of our bitmaps, damaging other objects within an input device or even outside of it. Let's add sanity checks to the returned old keycodes. Reported-by:<syzbot+c769968809f9359b07aa@syzkaller.appspotmail.com> Reported-by:
<syzbot+76f3a30e88d256644c78@syzkaller.appspotmail.com> Link: https://lore.kernel.org/r/20191207212757.GA245964@dtor-ws Signed-off-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Loading
-
mentioned in commit bdec3841
-
mentioned in commit c4c90fda
-
mentioned in commit 70b73050
-
mentioned in commit f78d7531
-
mentioned in commit 3b9fb534
-
mentioned in commit 29ff6da9
-
mentioned in commit 0d3436bd
-
mentioned in commit 0cf6a5a3
-
mentioned in commit 813d47a4
-
mentioned in commit 7d23b758
-
mentioned in commit d6d02b83
-
mentioned in commit 1bb8ee17
Please sign in to comment