From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 0DFAE377A89; Thu, 20 Aug 2026 15:02:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787238134; cv=none; b=SeLc72xnh/AObFg+CL9JwBLdEtNLPZrFyV4cP4oXcq5q06cHq2k1kqjUTPYT4f33hN74NMMMcqfGSZPQablDRuNw+LELv72uxlSnPyp6vTeaG8nDml4q6kQdliTBLb0mRXUPcl4ep28fpg3wkKMZlbYkLEM72WNaNv9vwvA7vb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787238134; c=relaxed/simple; bh=JtuJRvvpR3OfRPJppLCOronSZHyw1m73abrIEUYwGmA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rzstomtovvvsyBv88D1AKeyOR7pj0T45LNzztwijV/f+ezMUzospkm9yZ/xRcTCaFAgr8GPBfJRnFxOpf5zx/MUl3v/nuWswX1h2Ozs6XdWQMfJoj0l+KYMbEg8crYqjimbhJmtRbs3iKb+edOdTpVv8YiFQIsW1JvK3Rf9wlfk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pvRZXPrL; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pvRZXPrL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 386171F000E9; Thu, 20 Aug 2026 15:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787238132; bh=7VcfS8ACISpjflgzGov+ivK0Wo8OY9P+Yhh4en7kUs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pvRZXPrLXhx6cnSf4zOVl1rCsTGhQfp4ON7eAyoSr4zGu5BPAEnonloYDMS43Ssjo 7DYdgtM5GgJS2f4A7BJS/0NFcB32qYjudtYhS/6oZKc9zwNR7Oasgh9sUfbn2DGjNr +Tl+pDzrvab9nwnpqcfhCHSgLLBH30MPgUoDO9rc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, sashiko-bot@kernel.org, Dmitry Torokhov Subject: [PATCH 7.1 043/228] Input: synaptics-rmi4 - fix F55 transmitter electrode count typo Date: Thu, 20 Aug 2026 16:53:05 +0200 Message-ID: <20260820145245.780767906@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260820145244.450574346@linuxfoundation.org> References: <20260820145244.450574346@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry Torokhov commit 6058f0fea10f3caf63a435677358d1b8e9325114 upstream. During F55 sensor detection, the transmitter (TX) electrode count was incorrectly assigned the value of the receiver (RX) electrode count due to copy-paste typos. This incorrect value was then propagated to the driver data and used by F54 to determine the diagnostics report size. On devices with more RX than TX electrodes, this inflated the perceived TX count, leading to incorrect report size calculations and potential out-of-bounds buffer accesses. Fix the typos by correctly assigning the TX electrode counts. Fixes: 6adba43fd222 ("Input: synaptics-rmi4 - add support for F55 sensor tuning") Fixes: c762cc68b6a1 ("Input: synaptics-rmi4 - propagate correct number of rx and tx electrodes to F54") Reported-by: sashiko-bot@kernel.org Cc: stable@vger.kernel.org Assisted-by: Antigravity:gemini-3.5-flash Link: https://patch.msgid.link/20260626051802.4033172-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/rmi4/rmi_f55.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/input/rmi4/rmi_f55.c +++ b/drivers/input/rmi4/rmi_f55.c @@ -54,10 +54,10 @@ static int rmi_f55_detect(struct rmi_fun f55->num_tx_electrodes = f55->qry[F55_NUM_TX_OFFSET]; f55->cfg_num_rx_electrodes = f55->num_rx_electrodes; - f55->cfg_num_tx_electrodes = f55->num_rx_electrodes; + f55->cfg_num_tx_electrodes = f55->num_tx_electrodes; drv_data->num_rx_electrodes = f55->cfg_num_rx_electrodes; - drv_data->num_tx_electrodes = f55->cfg_num_rx_electrodes; + drv_data->num_tx_electrodes = f55->cfg_num_tx_electrodes; if (f55->qry[F55_PHYS_CHAR_OFFSET] & F55_CAP_SENSOR_ASSIGN) { int i, total;