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 4A7CD44212D; Tue, 21 Jul 2026 22:22:51 +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=1784672572; cv=none; b=OsiaCSi5U3KQ7+JJQFF67et4nNBHfhJmkkclM0VSwFZvRhxzfPWICYImwNr5ixCff70iq1AInGl5rpYnLGZjVS1/aReoiLA1/Hr9y/XWSkbBjHH+2yAjAKLF4YixlwU3Oojfya77G9nZ2ic6x0/lzPXhOe6srDol7z+s4ICIfR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784672572; c=relaxed/simple; bh=ONVCHp+9TbE/UkXNFOHdAgeBkhNT3Ij1JgM/YL4T1Bk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=shKVylUVZr7zE1d2z6qljibxtUcucs2jYQ5SxtJNEwQQJtbCo7tYx8gDxRdvhaocnY5l+GQVM4Htymso0oUWUbsuMDCWFHSWRQxvEVRsxgHj2H24Hc3U0Fzt1bE2acVD1n6XmDOV4rf3XYu2ryxQdCcknlHOme/UkOSnT+rFPec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=U+4fSVVk; 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="U+4fSVVk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1DCD1F000E9; Tue, 21 Jul 2026 22:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784672571; bh=ZCRM0LClQtfZFWMMc1lAUC6f0PDZ5zTWAoSW4aDD524=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=U+4fSVVkjfNGL5dCmmbyxaQzBRGj7El7rTP7CbdPCyhXKOnlfWb3qrd8a9eGSVqlj bDFWk2FnqlxahGC83g/2GPle/y+3K5uVUXIqha8DKSn7ZTDDO1Ss397SwaQQxmuuGS 4xRoUNiIsmT7aCt74uJkC0mVY/gf2HNVFrNxHNa4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko bot , Dmitry Torokhov Subject: [PATCH 5.15 673/843] Input: ims-pcu - fix out-of-bounds read in ims_pcu_irq() debug logging Date: Tue, 21 Jul 2026 17:25:08 +0200 Message-ID: <20260721152421.200395112@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152405.946368001@linuxfoundation.org> References: <20260721152405.946368001@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 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry Torokhov commit 403b0a6970b1084bb27907c0f8225801fdd0fe1d upstream. The debug logging in ims_pcu_irq() unconditionally prints data from pcu->urb_in_buf. However, if the interrupt fired for pcu->urb_ctrl, the actual data resides in pcu->urb_ctrl_buf. If urb->actual_length for the control URB exceeds pcu->max_in_size, this leads to an out-of-bounds read. Fix this by printing from the correct buffer associated with the URB. Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver") Cc: stable@vger.kernel.org Reported-by: Sashiko bot Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/ims-pcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/input/misc/ims-pcu.c +++ b/drivers/input/misc/ims-pcu.c @@ -1547,7 +1547,7 @@ static void ims_pcu_irq(struct urb *urb) } dev_dbg(pcu->dev, "%s: received %d: %*ph\n", __func__, - urb->actual_length, urb->actual_length, pcu->urb_in_buf); + urb->actual_length, urb->actual_length, urb->transfer_buffer); if (urb == pcu->urb_in) ims_pcu_process_data(pcu, urb);