Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D65A926CE32 for ; Fri, 1 May 2026 13:56:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777643801; cv=none; b=DNLaLZe3rlSqdsuCm87yC8S2vRoCokI4eWjgd8+FB8Tb/fbTGPqfSjnBYVmpIRQWy1xuDRt+kuYYkt5+/rLG6dDZ98N97wl8WstZQberr8+g6H2IPkyDdqvWIM8zGYqL/KX+gG7IunKNlxDnOrzQR4MNTrTT278LfduCWwkWbcY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777643801; c=relaxed/simple; bh=W2qIRSJlSDn4/pFdRzx/FuOfMdNX1XiMylA17i4HKQ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ipwBC9fYdzdUpvej3vb81MFfRmjSzWktnIu0RbQ5g2tHZJjFMadxJ3Kzk8Izr2DFqpB/qxxG1xHBVs1ZVAdpYJCnopuGUbAgKrQ/VWplvERZirhzZAXV/IoA3uc44ptAPG4pf/AtBnIysfEkDddLAJdmnwYnaZMwbz+Pp1sLzuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Sqo6Dnvy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Sqo6Dnvy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 211FAC2BCB4; Fri, 1 May 2026 13:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777643801; bh=W2qIRSJlSDn4/pFdRzx/FuOfMdNX1XiMylA17i4HKQ8=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Sqo6DnvyRgnAZrzOoXdWdCEU+JCOoOSzIlCiRaZLZMOdHY3/MyyMZcS8zzunJrnQv mA7TBBdrEMAQ6js8622i2lgcnFC0t5fFh68rwOp2ltzasWvZzVwEqoGxawlJyB1Znu a4518bptZGAPzY60Hat9CdNCl8ZrdKlrfe516Q8M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31708: smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path Date: Fri, 1 May 2026 15:56:30 +0200 Message-ID: <2026050121-CVE-2026-31708-f27c@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3255; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=zaqtE/CjMzYjKL4/YJgqQa8cyr1f50lyjrg2/0uZ1iI=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlfNrJJZ/R7KUrtanVc3vFp3XbJ9mjzxNe7bE77JLG3r xCrMoruiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIuoMcyz/V709OXj/xXXO+KZ 2sKXvW9UtYlmWHBBZPu3Oy6O03Mtm3IWTzsS7sPCuwMA 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: smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path smb2_ioctl_query_info() has two response-copy branches: PASSTHRU_FSCTL and the default QUERY_INFO path. The QUERY_INFO branch clamps qi.input_buffer_length to the server-reported OutputBufferLength and then copies qi.input_buffer_length bytes from qi_rsp->Buffer to userspace, but it never verifies that the flexible-array payload actually fits within rsp_iov[1].iov_len. A malicious server can return OutputBufferLength larger than the actual QUERY_INFO response, causing copy_to_user() to walk past the response buffer and expose adjacent kernel heap to userspace. Guard the QUERY_INFO copy with a bounds check on the actual Buffer payload. Use struct_size(qi_rsp, Buffer, qi.input_buffer_length) rather than an open-coded addition so the guard cannot overflow on 32-bit builds. The Linux kernel CVE team has assigned CVE-2026-31708 to this issue. Affected and fixed versions =========================== Issue introduced in 5.1 with commit f5778c398713692a16150ae96e5c8270bab8399f and fixed in 6.6.136 with commit a34d456934fe42e4da5d2cc07787bf418bee99c6 Issue introduced in 5.1 with commit f5778c398713692a16150ae96e5c8270bab8399f and fixed in 6.12.84 with commit ac2f14e4705d020f04e806efa0d49ab8dc2b145f Issue introduced in 5.1 with commit f5778c398713692a16150ae96e5c8270bab8399f and fixed in 6.18.25 with commit 078fae8f50adebb903ccf2252b44391324571e78 Issue introduced in 5.1 with commit f5778c398713692a16150ae96e5c8270bab8399f and fixed in 7.0.2 with commit 85fd46ee26a11841c670449508025965f61ce131 Issue introduced in 5.1 with commit f5778c398713692a16150ae96e5c8270bab8399f and fixed in 7.1-rc1 with commit a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e 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-31708 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: fs/smb/client/smb2ops.c 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/a34d456934fe42e4da5d2cc07787bf418bee99c6 https://git.kernel.org/stable/c/ac2f14e4705d020f04e806efa0d49ab8dc2b145f https://git.kernel.org/stable/c/078fae8f50adebb903ccf2252b44391324571e78 https://git.kernel.org/stable/c/85fd46ee26a11841c670449508025965f61ce131 https://git.kernel.org/stable/c/a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e