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=1793187560; b=cvTZVGK7oLahhK/MViIFec8PUdun2mc+se8UIy2jaAT2q+8IGaFEzstIPTNiNzLjfwpO aKk+L9JdG1bZIMebqZX/h27Ie70lbG+3l3flN39inxPG/E7KsqPS62b6MUC4kRIBa/7dU TwGPrtb4MmaP1ieGUTkEDw+0aaolRlBa+cAa5VDI92QIty8ikcZDPeSh1vQhLpKpECApX uZ2gQCnAP2OGn+V5QeUHIXLsU+G7k2m7Wiul6KPDw9DEMN2jTM5Pa8Jil2JN7MH3iYmUi VtRCyIFotfg+Nb3+LN7fsTyxMw26YScp8tTeeivv85hmowPNdSnRgcZw3ULZ5AXoxgQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793187560; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=y3qn6zU3SHpp8GvI3Qp/c80R4zMiiBZsQ1TzNV6x5+I=; b=eK6yLBzG0b5+Epjv/LhTVNqeJ0H7K+NLE9ZQMSmx1QS0/0iQpx1ML62nyHhpRAbF4Y8g 6fgKOn+uqYY8Ds0bPnoTCb0OsLvDTGQt9wHjYkRVHZS3PGolxBpz6qU95dlprVGe+djqM Nofy3FGXsoC8cCPG3ECyn+zU+TuqoNzb5BePa6kuzVSxoTefS/U/rDnw+61ePV7ps8yQw 0whWRfFSKv9AJ7qmbJck3KqxNpK402zwpftyq29AAaHWkmlj9zZ3hORR5JcjzdmUKWA8s o/6lipULjQBD0UE08nItRXAHGhac54O2Bcfx2gcUjVT91+U65UvcgL3izjOYWuFwrKw== 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=RdMLlx9O; 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 1F15E606A326 for ; Wed, 28 Oct 2026 11:39:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=RdMLlx9O Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AFA11F031E0; Wed, 28 Oct 2026 11:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1793187560; bh=y3qn6zU3SHpp8GvI3Qp/c80R4zMiiBZsQ1TzNV6x5+I=; h=From:To:Cc:Subject:Date:Reply-To; b=RdMLlx9OU5iio1SSQ2ZUpqxpE0gYsBykA7kMsJrbiV3hq/f2vNDONW3Y196Tr1xyX Vmy2Vza53DFolUR9oyxGMRAq+yrRErWmDR8+thgMjXFEE91e5t9zVm16RQf4kimsdc YIfHMbqdcOtahPQ0ieLRrRbaQofHzxwGIGSkTjsk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99157: scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies Date: Wed, 28 Oct 2026 11:35:44 +0100 Message-ID: <2026102804-CVE-2026-99157-f0dc@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2753; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=c6FHsApLNmDA8EeN8khaj5lWu2BZhOOXI4dmOll69bc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkPz9/gtS95Mvnl69wphvc7LbZHph+2uCLHGMoX1V0Sf I95XplTRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkdwHDPKvfgXOaLE/0lRRJ yzI/ymbIkbfexrCgIfvq3Yfy1/6wlVlb9F2bvvHmko0cAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies bsg-lib allocates a 96-byte (SCSI_SENSE_BUFFERSIZE) reply buffer per job, but struct ufs_rpmb_reply is 104 bytes: a 40-byte struct ufs_bsg_reply followed by a 64-byte EHS. When an Advanced RPMB command returns an EHS, ufshcd_advanced_rpmb_req_handler() copies it right after the 40-byte header and writes 8 bytes past the end of the buffer. Let each BSG transport pass its reply buffer size to bsg_setup_queue() and have ufs_bsg request sizeof(struct ufs_rpmb_reply), so the full reply reaches user space. Other transports keep SCSI_SENSE_BUFFERSIZE. The Linux kernel CVE team has assigned CVE-2026-99157 to this issue. Affected and fixed versions =========================== Issue introduced in 6.3 with commit 6ff265fc5ef660499e0edc4641647e99eed3f519 and fixed in 6.18.59 with commit 2effbe746452c108188f85a6951f2b0b65653840 Issue introduced in 6.3 with commit 6ff265fc5ef660499e0edc4641647e99eed3f519 and fixed in 7.2.13 with commit 7a755f6d47b811d3abd93c1642ce5e63894540b8 Issue introduced in 6.3 with commit 6ff265fc5ef660499e0edc4641647e99eed3f519 and fixed in 7.3 with commit ec6b083915e8146e147314a5f4f1285d07b57bfc Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-99157 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: block/bsg-lib.c drivers/scsi/mpi3mr/mpi3mr_app.c drivers/scsi/scsi_transport_fc.c drivers/scsi/scsi_transport_iscsi.c drivers/scsi/scsi_transport_sas.c drivers/ufs/core/ufs_bsg.c include/linux/bsg-lib.h Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/2effbe746452c108188f85a6951f2b0b65653840 https://git.kernel.org/stable/c/7a755f6d47b811d3abd93c1642ce5e63894540b8 https://git.kernel.org/stable/c/ec6b083915e8146e147314a5f4f1285d07b57bfc