[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250223025417.2617-1-hdanton@sina.com>
Date: Sun, 23 Feb 2025 10:54:16 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+0154da2d403396b2bd59@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [input?] [usb?] KASAN: slab-use-after-free Read in steam_input_open
On Sat, 22 Feb 2025 09:01:23 -0800
> syzbot found the following issue on:
>
> HEAD commit: 0a86e49acfbb dt-bindings: usb: samsung,exynos-dwc3 Add exy..
> git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17c02ba4580000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
--- x/drivers/hid/hid-steam.c
+++ y/drivers/hid/hid-steam.c
@@ -1086,15 +1086,14 @@ static void steam_work_unregister_cb(str
connected = steam->connected;
spin_unlock_irqrestore(&steam->lock, flags);
+ if (opened) {
+ steam_sensors_unregister(steam);
+ steam_input_unregister(steam);
+ }
if (connected) {
- if (opened) {
- steam_sensors_unregister(steam);
- steam_input_unregister(steam);
- } else {
- steam_set_lizard_mode(steam, lizard_mode);
- steam_input_register(steam);
- steam_sensors_register(steam);
- }
+ steam_set_lizard_mode(steam, lizard_mode);
+ steam_input_register(steam);
+ steam_sensors_register(steam);
}
}
@@ -1340,6 +1339,7 @@ static void steam_remove(struct hid_devi
hid_hw_close(hdev);
hid_hw_stop(hdev);
steam_unregister(steam);
+ disable_work_sync(&steam->unregister_work);
}
static void steam_do_connect_event(struct steam_device *steam, bool connected)
--
Powered by blists - more mailing lists