Skip to content
Commit e53fc232 authored by Vicki Pfau's avatar Vicki Pfau Committed by Jiri Kosina
Browse files

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



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>
parent a6a4f4e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment