From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail115-100.sinamail.sina.com.cn (mail115-100.sinamail.sina.com.cn [218.30.115.100]) (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 3729318A6B2 for ; Mon, 6 Jan 2025 12:38:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736167125; cv=none; b=MEe7eixPgrHw4462pWYa84SK37GXh0miYKrQ3n1eQrwe59FmNmhafUFHYT3GzDEPRbRfvVWeJWt9IZ0EpLeGIqYHP1JDW6zcmSzTYRXfG2D6IjH0PONAuv0o2wj6ZIQhUpgcANC4ld8OY0COj+zSRGjnjS2lu7xwVK1SB+s7QJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736167125; c=relaxed/simple; bh=2YqNrdlnQwNMXHwaXX5lHkzvtmJS2b3JvpRxHVXWIsk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=quxHINrIYFnRlX8WeAT3m/pHZnd2eLEpMmvva0W+7fOOn50JxkgDDrZJ/9M8HRkYQ2P10Qoxf2tN91jP9BapFQHSttvsMpXtASTewSsDU0aLSXOr/lAORN019drsp/LzfsOmK/f97B9RgoSgQsPP0VYY8jHcvti953WjtLvHSsM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([116.24.9.62]) by sina.com (10.185.250.23) with ESMTP id 677BCEC500003F8E; Mon, 6 Jan 2025 20:38:31 +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: 9382188913362 X-SMAIL-UIID: E93171FF2C8F435D9A339BC44AF4E870-20250106-203831-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [input?] KASAN: null-ptr-deref Read in input_event Date: Mon, 6 Jan 2025 20:38:19 +0800 Message-ID: <20250106123820.1469-1-hdanton@sina.com> In-Reply-To: <677a4359.050a0220.380ff0.000d.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 On Sun, 05 Jan 2025 00:31:21 -0800 > syzbot found the following issue on: > > HEAD commit: f097a36ef88d dt-bindings: usb: qcom,dwc3: Add QCS615 to US.. > 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=17e2a8b0580000 #syz test --- l/drivers/hid/hid-appleir.c +++ y/drivers/hid/hid-appleir.c @@ -150,12 +150,16 @@ static int get_key(int data) static void key_up(struct hid_device *hid, struct appleir *appleir, int key) { + if (!appleir->input_dev) + return; input_report_key(appleir->input_dev, key, 0); input_sync(appleir->input_dev); } static void key_down(struct hid_device *hid, struct appleir *appleir, int key) { + if (!appleir->input_dev) + return; input_report_key(appleir->input_dev, key, 1); input_sync(appleir->input_dev); } --