From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp153-168.sina.com.cn (smtp153-168.sina.com.cn [61.135.153.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F1FB2F1FEA for ; Tue, 28 Apr 2026 08:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=61.135.153.168 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777363239; cv=none; b=f6p3X6ewy4JDnp93weXcvx1P4FJTHZhTAs+CRa4X6hgl6KMljA1Of9d8GBEkNUaJLFiSaDX+M7cOjwIMKQhNc0K8L/MnvUkKYTOvrvzfjhqHLTYHWgiB3b/3DWWz2fcJQdg9t9sOBUzG0dpfyXXVrqVwwlw4ylcwWKNQntKQ22c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777363239; c=relaxed/simple; bh=cnshoZ8YXT5m4+T2Vg/ZdzWV8AT2vpGFA2I4+EQ+8cc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pTFQpDZWq+6XzLMRt2yNEtcve5AAW9rMxCrrEkebaE06TKU5pUZM5PNx9t7nguZeSXyxwH6H9760ZEQlayT1boTnV8M1KT8jL246SauY06S20SoxigvKlikYkx61Gj/HKaiP+X1Z/tGW6fRTo/1Zeo7JsS8N1h6yv9AdgKXpHUI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=n7C/xcB8; arc=none smtp.client-ip=61.135.153.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="n7C/xcB8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1777363233; bh=iBwXKyKjI0Zu+s1b2C43ESe4zmD6IXQB3BNrKgP8wXU=; h=From:Subject:Date:Message-ID; b=n7C/xcB8brwMBYz6RQR17eCN1rbsM/rX3OcPrn5HpN4sk9yczapC6cyaY9eq9xnGI 8OwZ3Ak+7cfmPoGlToDblE7Qwl6M19Gnqo2yEMu7klIFkwabID4WwrFXS6TKE+tZg0 BUccsDiPoEXx6zY5P1oQSQz7MCkIomffFgG/rjnA= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.62.144]) by sina.com (10.54.253.33) with ESMTP id 69F0691100006FEC; Tue, 28 Apr 2026 16:00:19 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 125666685270 X-SMAIL-UIID: 6E2CD463F57E4944B23FD08BFEC59010-20260428-160019-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [input?] [usb?] KASAN: slab-use-after-free Read in hidraw_report_event Date: Tue, 28 Apr 2026 16:00:06 +0800 Message-ID: <20260428080007.2192-1-hdanton@sina.com> In-Reply-To: <69eed7e0.a00a0220.7773.0026.GAE@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > Date: Sun, 26 Apr 2026 20:28:32 -0700 > Hello, > > syzbot found the following issue on: > > HEAD commit: 7080e32d3f09 Add linux-next specific files for 20260424 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=13d8b2d2580000 > kernel config: https://syzkaller.appspot.com/x/.config?x=d941ac7f11ceb230 > dashboard link: https://syzkaller.appspot.com/bug?extid=9eebf5f6544c5e873858 > compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14d309ba580000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a082ce580000 #syz test --- x/drivers/hid/hid-core.c +++ y/drivers/hid/hid-core.c @@ -2404,8 +2404,8 @@ EXPORT_SYMBOL_GPL(hid_hw_start); */ void hid_hw_stop(struct hid_device *hdev) { - hid_disconnect(hdev); hdev->ll_driver->stop(hdev); + hid_disconnect(hdev); } EXPORT_SYMBOL_GPL(hid_hw_stop); --- x/drivers/hid/usbhid/hid-core.c +++ y/drivers/hid/usbhid/hid-core.c @@ -279,6 +279,8 @@ static void hid_irq_in(struct urb *urb) switch (urb->status) { case 0: /* success */ usbhid->retry_delay = 0; + if (test_bit(HID_DISCONNECTED, &usbhid->iofl)) + return; if (!test_bit(HID_OPENED, &usbhid->iofl)) break; usbhid_mark_busy(usbhid); @@ -1278,6 +1280,15 @@ static int usbhid_power(struct hid_devic struct usbhid_device *usbhid = hid->driver_data; int r = 0; + mutex_lock(&usbhid->mutex); + + r = -ENODEV; + if (test_bit(HID_DISCONNECTED, &usbhid->iofl)) + goto out; + if (!test_bit(HID_STARTED, &usbhid->iofl)) + goto out; + + r = 0; switch (lvl) { case PM_HINT_FULLON: r = usb_autopm_get_interface(usbhid->intf); @@ -1287,6 +1298,8 @@ static int usbhid_power(struct hid_devic usb_autopm_put_interface(usbhid->intf); break; } +out: + mutex_unlock(&usbhid->mutex); return r; } --