From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp134-25.sina.com.cn (smtp134-25.sina.com.cn [180.149.134.25]) (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 313911D8E06 for ; Mon, 6 Jan 2025 10:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736160756; cv=none; b=tlegOv9L1jmWRkYAD2OFG+T55v3DbxYEcw7WbLkOPon5kcez7AAzfzANdIV7LGP//aMaWhamWue2G6oWC53QvTsmiHDHz1/KkCWz9OdUj/yrPv6Nb2HBjdAw2nTTyYDPPGutEc0uqBrW4dIZ3GhSqpwnt9WNQ+hyx+VaJtPecK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736160756; c=relaxed/simple; bh=gQ2P6Q/nXX2UlNFJrt5TvBujgyZVsBQoa1DvuoVNkho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AXIPxD5DtKQgBZUoHoKCR5kNMiYwGxiW3c1VGzuVv9SWwSHX35oYd6ECDesyp3t0F+8OlYU7fwzgyo1OC/D7toiOKVukRWsaY9UWiJUaoEXk4PvVAPENhiI8FW2U/KY5XzODtiXftMM31XqwL4kW+W44/Ot7ROhKa1Dg9Ny/P3o= 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=180.149.134.25 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.21) with ESMTP id 677BB55500001233; Mon, 6 Jan 2025 18:50:00 +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: 1080633408347 X-SMAIL-UIID: 7CE38BF25F7D4CA9881B840875678702-20250106-185000-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 18:49:47 +0800 Message-ID: <20250106104948.1404-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 --- x/include/linux/input.h +++ y/include/linux/input.h @@ -140,17 +140,17 @@ struct input_dev { const char *uniq; struct input_id id; - unsigned long propbit[BITS_TO_LONGS(INPUT_PROP_CNT)]; + unsigned long propbit[1+ BITS_TO_LONGS(INPUT_PROP_CNT)]; - unsigned long evbit[BITS_TO_LONGS(EV_CNT)]; - unsigned long keybit[BITS_TO_LONGS(KEY_CNT)]; - unsigned long relbit[BITS_TO_LONGS(REL_CNT)]; - unsigned long absbit[BITS_TO_LONGS(ABS_CNT)]; - unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)]; - unsigned long ledbit[BITS_TO_LONGS(LED_CNT)]; - unsigned long sndbit[BITS_TO_LONGS(SND_CNT)]; - unsigned long ffbit[BITS_TO_LONGS(FF_CNT)]; - unsigned long swbit[BITS_TO_LONGS(SW_CNT)]; + unsigned long evbit[1+ BITS_TO_LONGS(EV_CNT)]; + unsigned long keybit[1+ BITS_TO_LONGS(KEY_CNT)]; + unsigned long relbit[1+ BITS_TO_LONGS(REL_CNT)]; + unsigned long absbit[1+ BITS_TO_LONGS(ABS_CNT)]; + unsigned long mscbit[1+ BITS_TO_LONGS(MSC_CNT)]; + unsigned long ledbit[1+ BITS_TO_LONGS(LED_CNT)]; + unsigned long sndbit[1+ BITS_TO_LONGS(SND_CNT)]; + unsigned long ffbit[1+ BITS_TO_LONGS(FF_CNT)]; + unsigned long swbit[1+ BITS_TO_LONGS(SW_CNT)]; unsigned int hint_events_per_packet; @@ -177,10 +177,10 @@ struct input_dev { struct input_absinfo *absinfo; - unsigned long key[BITS_TO_LONGS(KEY_CNT)]; - unsigned long led[BITS_TO_LONGS(LED_CNT)]; - unsigned long snd[BITS_TO_LONGS(SND_CNT)]; - unsigned long sw[BITS_TO_LONGS(SW_CNT)]; + unsigned long key[1+ BITS_TO_LONGS(KEY_CNT)]; + unsigned long led[1+ BITS_TO_LONGS(LED_CNT)]; + unsigned long snd[1+ BITS_TO_LONGS(SND_CNT)]; + unsigned long sw[1+ BITS_TO_LONGS(SW_CNT)]; int (*open)(struct input_dev *dev); void (*close)(struct input_dev *dev); --