From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5939331237 for ; Sat, 23 May 2026 05:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779512818; cv=none; b=D7CQXgRgcX/MhDM4FxSCwjD2mE5E9bx2LXIrf1hJCz+ri2cqbKXenMZSwJxkzJPtyFD8kXUkbvzEQR0jY49XaUVYvxE76YZPUMvI/2Hslfg44XSDbKPPr3iDnB5obhXC+D3Q52eBCT78jttsUUdAeCexxH+mx5I09P7pgouPC/0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779512818; c=relaxed/simple; bh=MDzmd62AJTHlHIH2co8oyK9ZcbspJpvz8LerLf4ymA4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PVLUz2dFAENs/Miobu8eEabVyGAUERy34E2SPIwtOL9g/CkKm2DEBfwi78Rp0gqeF5bzq4JJ9hOPO6xTL7M0DH15QRU9tX/X/fhA2lnG4hsBxfD+ngx6l7XISIeSo50GU9tmV8wdh+ZlY4nPpjwSKoZRHiNhP1hcRuY0cyK4xSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=afTTDxB2; arc=none smtp.client-ip=74.125.82.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="afTTDxB2" Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-3044857f09aso2830354eec.1 for ; Fri, 22 May 2026 22:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779512812; x=1780117612; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7a+I4YbWgCb4RQjRS7D/qsAOOz1ec58M0Yo5rgLJumw=; b=afTTDxB2Xq526omDABUSUXns0HCOROZV3Jxfag825q9srUzG50RiBkLZ8UqbZ691LI MZbwc+EnXOFpp/IVjigEsdzvt8WmmSrhFpDi+SlUeV+Ie9JOo+vK3vNr6y/IOIrzosUQ cYA7zVRf2ro1AXdqdE8CJCLRyohLS/wfyEMKIsPfSXqj66x086rQRlmWO2C6jg2Dn+Qs n0Pbvxs8AWEdSeOrkuuDJTmY2xdBhc/49x7sYhixxdLMQ7MsSflwYuAU4ammqS7WH3W1 7PDBevQhJVTdCDrnYQSAHy70xbP9CBPFDgcpkHIrJw50e+Tu3rCB+JqrhpP34blUUiJq S7ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779512812; x=1780117612; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7a+I4YbWgCb4RQjRS7D/qsAOOz1ec58M0Yo5rgLJumw=; b=r5d+dqRrclDI7yg+YnhDDvSjjJIxfuUfUF1kGvjsK8VAK5i2UkrN9D6k9MHHsDlgSK +AtmcJ5bPA9Hp/toLu3AufOkMWe9PoAiN4tQTkh+UhfUdSBVuYDwAabIxg1cJgyT6+uu QSBSBJNHpz8OlsjVesb0d1Cejn4MsnG2onNziAGXInhLeRa/XZbEO8c607CwENq7wkMz 2651MG/170FIvSU89CKq61E9nQ2WFo7Ta1aVuVu2InL3QjPl8oSPlT3V3WdmJHlXDwrv Ry3mDXVDK674KuHhycu0mE5Spl+jaCCK12W3dpreTdj0nyuJ4j6VsXhGpQCy+GI2VwO5 CnGA== X-Forwarded-Encrypted: i=1; AFNElJ/4Pr8HM/8cf+dtPb7SoyLdYgOZMdMFxI0ws6QQ9zklE4/TrO5e/Ac5XY60KsFT6MfyR14pamBeTLc034o=@vger.kernel.org X-Gm-Message-State: AOJu0Yyqg2psT9ZM3Kdid76WMjx2p30BesdRvynAzaqg7lPpMEQxfhUF mxtzFHLhqw5FJbW4F7u4t9uoApHkTaJrmk3/t9E1S5/OpFbdoOkAx+GzngrCcA== X-Gm-Gg: Acq92OHjq3Azt7YTr1qL98WVI4EsA6yA2SxPR/emfu9Ue3itlXLpxLqSkC0J/7TMUJN E6siO1JCZhaz2utPBqtFXkiM2j35l30fro8epmVa3XnAGth7TnCvTTVhi9qQ7V3JySKeYJNdR6Y Fn4wQylu/PlE7unU3VU/FOmn3pZjzjvp/da3Skl+sqYKWEMyRW0YtFvxqfq66Bh+WdUxpD8WndT JA7DbQ372N9XFrWocILBCnXXKpNL1oEE5SpL6ThaeBuAwPhQbjlQ/i6U8vuWL4isjA0fEnUXt0D wYe8ttLalxoy2VMvPLWcQloMSR2VpE63PQXtg3ZPem68HZlnqwWf9Kfeme8RO2xnI316Yzpft+H gSE0/K+xZHQINXlNjunJr2uD347OquFfIgWjhc1RNmgn8vY+zmxvZunY/JcbQll+ewd/pGR++T2 uQMnCKBHWReT64APD/3+QMRKSQR72F0QXOpWG3ww3OSN2S6WaOkBsvZp9UIxewBPztmwx/h9gOL dEaEUYuZ0SMbw== X-Received: by 2002:a05:7301:198a:b0:2d8:7302:d3d with SMTP id 5a478bee46e88-30448f4b600mr3397307eec.8.1779512812030; Fri, 22 May 2026 22:06:52 -0700 (PDT) Received: from dtor-ws.sjc.corp.google.com ([2a00:79e0:2ebe:8:7e45:2bd:3c86:d34a]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30451f3feadsm3502583eec.13.2026.05.22.22.06.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2026 22:06:49 -0700 (PDT) From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Thomas Fourier , Seungjin Bae , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Sashiko bot Subject: [PATCH 07/11] Input: ims-pcu - fix logic error in packet reset Date: Fri, 22 May 2026 22:06:25 -0700 Message-ID: <20260523050634.501509-7-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.54.0.746.g67dd491aae-goog In-Reply-To: <20260523050634.501509-1-dmitry.torokhov@gmail.com> References: <20260523050634.501509-1-dmitry.torokhov@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ims_pcu_reset_packet() incorrectly sets have_stx to true, which implies that the start-of-packet delimiter has already been received. This causes the protocol parser to skip waiting for the next STX byte and potentially process garbage data. Correctly set have_stx to false when resetting the packet state. Fixes: 875115b82c29 ("Input: ims-pcu - fix heap-buffer-overflow in ims_pcu_process_data()") Cc: stable@vger.kernel.org Reported-by: Sashiko bot Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov --- drivers/input/misc/ims-pcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index 0e7a783526e6..cdb46b2297a2 100644 --- a/drivers/input/misc/ims-pcu.c +++ b/drivers/input/misc/ims-pcu.c @@ -440,7 +440,7 @@ static void ims_pcu_handle_response(struct ims_pcu *pcu) static void ims_pcu_reset_packet(struct ims_pcu *pcu) { - pcu->have_stx = true; + pcu->have_stx = false; pcu->have_dle = false; pcu->read_pos = 0; pcu->check_sum = 0; -- 2.54.0.746.g67dd491aae-goog