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=1794061780; b=zLhAh26d8Rf3R0lR62vTyOMbDPedVWqAHgCTSPsA+/JrQy4ky9IsSTNIjd/fqM7U7G91 0V/aaQKzgatWMyS+34T4wVls2jD0720POqkPUPu3gu3cQEz8G2iBjAEo2YI3u9NMQy4ix YkvwasZRVA2XdIJ85hW9iuKbsA7ZSCoj8AeRHyBvQjd7uVp853fgO9xHB205yYIi2jDF+ uL2gUBKcGkm8u+NhdpSkvYW+voWxds0k7RfhX+B03TeYM9mmcbkmViGVYk8HVzPHGNfqn QvpmypxAjSbWzBi8dis4fteJjHknMiQntTxLUKNH4yRZsEFyLVrF1+kGB1o5gCh3yIg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794061780; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=JEPSqaomzCNq5iPsiyKqhvdFRiVophChp6DDfw4Oqlc=; b=4PAhZmtggowa3kTWGALrQXl1xw/cKOwZFZzKfutO9uAejlk7XHEvn1vH5Z6ZHGlg13sx EQ3BLqjsghRh0FSWNM7dpywayUVw+xYuVeafhueoViME5VR+6DHZzu6UFIHkc4+Ue7VF0 Q8EWcDxJWuIQVPDtwwQzPylR0iN2qNyQOy3ELVU+y3Y57Ype/D2bXDX8VeNvLpTiM4+Pc /l1gS+qvaweBFKzDIxM50mH8BsLwBR0oeqfxpP/btAysEUfFuUSx5/2IRHozFVjd4Z5Bq ffpZs94GTTKXh52WcEAkn+I4rpa9vKz+QAlao1rGfFjOY7ma/ldUMaubJHCkmJ7svrw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=VuPIP168; 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 71521606A332; Sat, 7 Nov 2026 14:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=VuPIP168 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 206101F0089F; Sat, 7 Nov 2026 14:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1794061780; bh=JEPSqaomzCNq5iPsiyKqhvdFRiVophChp6DDfw4Oqlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VuPIP168lqJvWxJ9Jk2rnwSRgIQRbEgIwLFBlmzdgn2em53FO/PhnH41PzK55+bE0 WLd3mOHbSC/DnE67Ey1s22ma643XHAmq9cvvTDjwsTKtJJqRTzNRq+GrZoRx7+/rpF WHTANRwhgaC7nXdUiZsbJ79xzZItUwaxBj082iuo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jiale Yao , Jiri Kosina Subject: [PATCH 6.12 0812/1536] HID: elo: reject short touchscreen reports Date: Sat, 7 Nov 2026 08:47:08 -0500 Message-ID: <20261107135020.352238436@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261107134957.653319350@linuxfoundation.org> References: <20261107134957.653319350@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiale Yao commit 1cb92fcb2ac344d78737e3c5cb7b061dfb2850b1 upstream. The HID core invokes raw_event callbacks before validating the report length. elo_raw_event() only checks the first-byte packet marker before elo_process_data() reads coordinates, flags, and pressure through offset seven. A truncated packet beginning with the expected marker can therefore cause an out-of-bounds read. Require the complete eight-byte SmartSet packet before parsing it. Commit 47669bec44fe ("HID: asus: refactor the two workqueues and init sequence") added the same kind of raw_event length validation to hid-asus. Fixes: d23efc19478a ("HID: add driver for ELO 4000/4500") Cc: stable@vger.kernel.org Signed-off-by: Jiale Yao Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-elo.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/hid/hid-elo.c +++ b/drivers/hid/hid-elo.c @@ -85,6 +85,9 @@ static int elo_raw_event(struct hid_devi if (!(hdev->claimed & HID_CLAIMED_INPUT) || list_empty(&hdev->inputs)) return 0; + if (size < ELO_SMARTSET_PACKET_SIZE) + return 0; + hidinput = list_first_entry(&hdev->inputs, struct hid_input, list); switch (report->id) {