From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-162.sinamail.sina.com.cn (mail3-162.sinamail.sina.com.cn [202.108.3.162]) (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 DD83C2D7804 for ; Tue, 28 Apr 2026 20:27:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.108.3.162 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777408050; cv=none; b=iSxbw0Q7BPtsklruV9tJzQSbpILAADl2xfHsvAkqqk3VXkNowBSUnhOEPkKU7cQY5EB5yzFFkHesdoccTgPSvnYq3nkEvD0nCrM5OZqpWXlLNe7+m8bdQYSS2Enq9yGypvV2S9MRUV+r0Vskc4jpl8JeSVUxXS77lQ+VljKWMKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777408050; c=relaxed/simple; bh=W4TLsqKJqax303O2vrlZmafWOPiEWV1SVJgtAVnKYrk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GoOk4eqhT9kgfObKED1FgS6epaf5HGWxhZsydeRfbZ8jssvgiuqb0//gbZbDStEtwxfl607RIBmg9iJrqT/K1N64bt26kZHx5mSL+gaJZGmKZD+HveB2vMQ3JUUg3jVe/0P1nWrewuA5hy/oEcbG2xIMnCvwxzbW7JuS1qGr3fA= 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=rIMRos4p; arc=none smtp.client-ip=202.108.3.162 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="rIMRos4p" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1777408046; bh=teGpf/Diu9z3zTbe1i6dikJxYGqAW2AdIP7ApVxy2+c=; h=From:Subject:Date:Message-ID; b=rIMRos4p8n0lAwGaYXGj/h+YgpFOn2+K7eoDSl7GKV9PszNk+/c47NQCTgU01H9yq 08cA+rMaK07btZN1k0QRsqpV/ajI0yxKoiNC3BbPJNzkwR7481D22aKp6EIR/z3/k+ EUMqkWwd5CH992GUPX60uO0Zj5FsgXKU8WpwE2zM= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.62.144]) by sina.com (10.54.253.34) with ESMTP id 69F118210000142F; Tue, 29 Apr 2026 04:27:16 +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: 8515676291974 X-SMAIL-UIID: EAC1551D8AFB49DFA5F3E9123F63682C-20260429-042716-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: Wed, 29 Apr 2026 04:27:03 +0800 Message-ID: <20260428202704.2236-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,9 @@ static int usbhid_power(struct hid_devic struct usbhid_device *usbhid = hid->driver_data; int r = 0; + if (hid->claimed == 0) + return -ENODEV; + switch (lvl) { case PM_HINT_FULLON: r = usb_autopm_get_interface(usbhid->intf); --