From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796441848; b=Byxhlp4Q0iKel9fbzRRfKxMc0qdsSd79Pdt8BJEllh6LRPRKBMxmAldcqFqQjBOlAdmp g7Cp/5zx5rNZq3X+s2sZ/DBVXty8b+klfCdP+P7eABLC05N9a7IhlClcXMY6ImY/39GIW o0tXMTm8/MVq4uupBb6SFv2Acv1w0/1cznS0HxqnXgk6QBiBylfmroZS6DFT/j4tDRnXj Z60AggSUzWnLloI01amd+Asbjp+ia89n5s6CDgey8f5KGFL2NECSm5AErH7dOYLYXLD6H 7k6xVzOWjKgkxrsOM5bDuvPfbWmNuSfEuRl5i166ePEXS57xCyPiaop4gC3bYS74Lfw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796441848; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Ld61hkgeKHM7zdMm6KbWAR93JHcYFIXO/56RisXK2hc=; b=KpaeJVoVca0cxQdQZCcQrw40xVt+9nDv6GlzCcMCtNlrYO2NArDn6hJBhkYbjq+BSubF KVPIf1kZDN5Gd+dm4Y6w1xKONXJk1R12lPZQE9LOYUo2r96+bHHD3jsFfANllXW4H1+fY bkuZnX+ePy8ts20wfPZYfBHd3/0ChWUR2zUTcwDe2d6i8wIQdbUikV9Iv7xN5pTshOTTr d3Ysv5/9PRSzGsIZ41eYVx//NT7BRE6zLM2Jm0d1twME2lDDo+3zKQr8nwp86rNqtsf2e 7uaDWgbat6CAjzMxl458yfI5dU6yfUUdcXpwhFgApZL5fcMvfibS9WD5cwFP0lLBbKw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fFH7h60j; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 064F5606A322 for ; Sat, 5 Dec 2026 03:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fFH7h60j Received: by smtp.kernel.org (Postfix) with ESMTPSA id 730A21F00936; Sat, 5 Dec 2026 03:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796441847; bh=Ld61hkgeKHM7zdMm6KbWAR93JHcYFIXO/56RisXK2hc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=fFH7h60jNUZCW++wgX4F7+Ol6moVR9oO9YlQ9EqtFg23Lo2GqbR/TwBp26RBJWo8Y ZKWshl+ck56BlCsjCKERQMk15SSTDjjSI0kOJODc4TxJqtfjxicRqqm1GPve5iEvCt wFRw9z7cUPR2edY4Pk962th6KncsmgMlJsAIZviVC17GHUHjaT4cx3+KU6BbKQdTdt qj7vBsfAQpmP0gORfEX6kRA085vDSWKwiiKjFZ+tL/ZTIuojoHfmKSupna6uDw/IPX np3TScXn6NVH21XpDrcioObXtKZJpzZG83lPaHkr2GtfAxp8KJ9Wp8QufGNX5USqjG B9kYek3S9tkPQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] HID: chicony: fix NULL dereference in ch_report_wireless Reply-To: sashiko-reviews@lists.linux.dev To: "Jaegyun Lee" Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com In-Reply-To: <20261205032508.1267520-1-dreams200260@gmail.com> References: <20261205032508.1267520-1-dreams200260@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 03:37:27 +0000 X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] HID: chicony: unratelimited hid_warn() in IRQ context in ch_report_wireless() -- commit 3ba1132e82880f936838b3d05ef6b879bd19eb9e Author: Jaegyun Lee HID: chicony: fix NULL dereference in ch_report_wireless This commit checks report->field[0]->hidinput for NULL before dereferencing it in ch_report_wireless(), falling into the existing !input warning path instead of crashing. > diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c > index 5776ec2e7159a..cce5042490c76 100644 > --- a/drivers/hid/hid-chicony.c > +++ b/drivers/hid/hid-chicony.c > @@ -26,12 +26,14 @@ > static int ch_report_wireless(struct hid_report *report, u8 *data, int s= ize) > { > struct hid_device *hdev =3D report->device; > + struct hid_input *hidinput; > struct input_dev *input; > =20 > if (report->id !=3D CH_WIRELESS_CTL_REPORT_ID || report->maxfield !=3D = 1) > return 0; > =20 > - input =3D report->field[0]->hidinput->input; > + hidinput =3D report->field[0]->hidinput; > + input =3D hidinput ? hidinput->input : NULL; > if (!input) { > hid_warn(hdev, "can't find wireless radio control's input"); > return 0; [Severity: Medium] Can this hid_warn() now flood the kernel log from IRQ context? Before this change, a NULL report->field[0]->hidinput faulted before the !input check, so this warning was unreachable. Now a device whose report ID 0x11 has no mapped input triggers hid_warn() on every report via hid_irq_in() -> __hid_input_report() -> ch_raw_event(). Because field[0]->hidinput stays NULL and hid_warn() is an unratelimited dev_warn(), repeated reports at USB polling rates can flood the log and cause console lock contention or soft lockups on serial consoles. Using hid_warn_once() with a trailing newline would avoid repeated warnings. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205032508.1267= 520-1-dreams200260@gmail.com?part=3D1