Commit a899adf7 authored by Vicki Pfau's avatar Vicki Pfau Committed by Greg Kroah-Hartman
Browse files

HID: hid-steam: Fix use-after-free when detaching device



[ Upstream commit e53fc232 ]

When a hid-steam device is removed it must clean up the client_hdev used for
intercepting hidraw access. This can lead to scheduling deferred work to
reattach the input device. Though the cleanup cancels the deferred work, this
was done before the client_hdev itself is cleaned up, so it gets rescheduled.
This patch fixes the ordering to make sure the deferred work is properly
canceled.

Reported-by: default avatar <syzbot+0154da2d403396b2bd59@syzkaller.appspotmail.com>
Fixes: 79504249 ("HID: hid-steam: Move hidraw input (un)registering to work")
Signed-off-by: default avatarVicki Pfau <vi@endrift.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 89f92c42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment