]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: core: zero-initialize the report buffer
authorJiri Kosina <jkosina@suse.com>
Tue, 29 Oct 2024 14:44:35 +0000 (15:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2024 12:13:35 +0000 (13:13 +0100)
commit05ade5d4337867929e7ef664e7ac8e0c734f1aaf
tree1559aa77b723ad5184aed025f5589be77c617c73
parent2a8e8ebe9df93583590002c5a3a81befb9e26350
HID: core: zero-initialize the report buffer

[ Upstream commit 177f25d1292c7e16e1199b39c85480f7f8815552 ]

Since the report buffer is used by all kinds of drivers in various ways, let's
zero-initialize it during allocation to make sure that it can't be ever used
to leak kernel memory via specially-crafted report.

Fixes: 27ce405039bf ("HID: fix data access in implement()")
Reported-by: BenoƮt Sevens <bsevens@google.com>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-core.c