Input: add bounds checking to input_set_capability()
stable inclusion from stable-v5.10.118 commit d5e88c2d76efa9d7bb7ceffaec60fe6c76c748d7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5L686 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d5e88c2d76efa9d7bb7ceffaec60fe6c76c748d7 -------------------------------- [ Upstream commit 409353cb ] 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> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Acked-by:
Xie XiuQi <xiexiuqi@huawei.com>
Loading
Please sign in to comment