diff options
author | Dongliang Mu <mudongliangabcd@gmail.com> | 2022-09-22 21:48:44 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-26 13:17:13 +0200 |
commit | 7dad42032f68718259590b0cc7654e9a95ff9762 (patch) | |
tree | 1d733764f8cbf20dcca9f4335d02ed19355afb36 /tools | |
parent | 125cc2e3ef8960631c6251d4f306bfe4e8b7992d (diff) | |
download | linux-stable-7dad42032f68718259590b0cc7654e9a95ff9762.tar.gz linux-stable-7dad42032f68718259590b0cc7654e9a95ff9762.tar.bz2 linux-stable-7dad42032f68718259590b0cc7654e9a95ff9762.zip |
usb: idmouse: fix an uninit-value in idmouse_open
[ Upstream commit bce2b0539933e485d22d6f6f076c0fcd6f185c4c ]
In idmouse_create_image, if any ftip_command fails, it will
go to the reset label. However, this leads to the data in
bulk_in_buffer[HEADER..IMGSIZE] uninitialized. And the check
for valid image incurs an uninitialized dereference.
Fix this by moving the check before reset label since this
check only be valid if the data after bulk_in_buffer[HEADER]
has concrete data.
Note that this is found by KMSAN, so only kernel compilation
is tested.
Reported-by: syzbot+79832d33eb89fb3cd092@syzkaller.appspotmail.com
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Link: https://lore.kernel.org/r/20220922134847.1101921-1-dzm91@hust.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions