HID: betop: fix slab-out-of-bounds Write in betop_probe
stable inclusion from stable-v4.19.209 commit bb8b72374db69afa25a5b65cf1c092860c6fe914 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9R4OM CVE: CVE-2021-47404 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bb8b72374db69afa25a5b65cf1c092860c6fe914 -------------------------------- commit 1e4ce418 upstream. Syzbot reported slab-out-of-bounds Write bug in hid-betopff driver. The problem is the driver assumes the device must have an input report but some malicious devices violate this assumption. So this patch checks hid_device's input is non empty before it's been used. Reported-by:<syzbot+07efed3bc5a1407bd742@syzkaller.appspotmail.com> Signed-off-by:
F.A. SULAIMAN <asha.16@itfac.mrt.ac.lk> Reviewed-by:
Pavel Skripkin <paskripkin@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Li Huafei <lihuafei1@huawei.com>
Loading
Please sign in to comment