Loading
HID: betop: check shape of output reports
stable inclusion from stable-v4.19.272 commit 7317326f685824c7c29bd80841fd18041af6bb73 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBWVXF CVE: CVE-2023-53015 Reference: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7317326f685824c7c29bd80841fd18041af6bb73 -------------------------------- [ Upstream commit 3782c0d6 ] betopff_init() only checks the total sum of the report counts for each report field to be at least 4, but hid_betopff_play() expects 4 report fields. A device advertising an output report with one field and 4 report counts would pass the check but crash the kernel with a NULL pointer dereference in hid_betopff_play(). Fixes: 52cd7785 ("HID: betop: add drivers/hid/hid-betopff.c") Signed-off-by:Pietro Borrello <borrello@diag.uniroma1.it> Signed-off-by:
Jiri Kosina <jkosina@suse.cz> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Xiangwei Li <liwei728@huawei.com>