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 80A22285CA3 for ; Tue, 16 Sep 2025 13:00:29 +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=1758027629; cv=none; b=O/6nur2pUzxV9+865tByzpmwSW3oLv65N2uMMryp4ur4Hq0U5KWEs94E/FBE3klJ9ELc6f+IH+6T1MQNp/vTa71kyxydrqC7XXFeUY0xTENRUfHUkVLzm/b2hpVjg+PxuQTIuBpc/i6I2ZW9+peGJX/pA47oQ1axdagfoLIhogg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758027629; c=relaxed/simple; bh=SjMPVo/RTJ9J2Qh3ljsjiFRpJlXliyU/OEDinVgJrJA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GrWXh86B/2pF53lAJvZUfeSAzOKxgEfSxNrkoqqa6pERaDuFMTMDfc/OA79AqKs8kz6EcTyAhFq4Hmk6mEb3no5DdFU/RrjPQqY1D3E7fuTtIyHR7x9qj/yqUctyIRQqbeuI3GWsIH7FJjAKDac+mdp0RJlm6TAKsH0E+iQ5rQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dzkmFOWJ; 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="dzkmFOWJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98DE3C4CEEB; Tue, 16 Sep 2025 13:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758027629; bh=SjMPVo/RTJ9J2Qh3ljsjiFRpJlXliyU/OEDinVgJrJA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=dzkmFOWJLovlBc9nvADCJR3tgyp+pq3w/NZUMoHQ0wA6ATLMEqygxvKgBymhFiJCr rYskEqVAxdbXjaQpYfReDBcLozUUZD3QzBNMb/YSo02vQjpjAp5x62mbNW9aODt4Rr BlBz3BI3nr8T9JXnMFbFI8jrYGV0uHDK6zk94GEw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39815: RISC-V: KVM: fix stack overrun when loading vlenb Date: Tue, 16 Sep 2025 15:00:21 +0200 Message-ID: <2025091615-CVE-2025-39815-a663@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2120; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=eNrdIS/yUSJrJm2SnLnYiaWMeEDG7K1irgbXJnYod90=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkn4+N36lY/eNqhfEfx4irWNj/uI5z6r+cVfF/77+tz5 4KjVzLzO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiO04wLNh77PzSfV65++ZV PrZk2u/9d4LdpecMC07FHlvp+eN41/FtVhuCvmWtTDB8qgQA 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: RISC-V: KVM: fix stack overrun when loading vlenb The userspace load can put up to 2048 bits into an xlen bit stack buffer. We want only xlen bits, so check the size beforehand. The Linux kernel CVE team has assigned CVE-2025-39815 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit 2fa290372dfe7dd248b1c16f943f273a3e674f22 and fixed in 6.12.45 with commit c76bf8359188a11f8fd790e5bbd6077894a245cc Issue introduced in 6.8 with commit 2fa290372dfe7dd248b1c16f943f273a3e674f22 and fixed in 6.16.5 with commit 6d28659b692a0212f360f8bd8a58712b339f9aac Issue introduced in 6.8 with commit 2fa290372dfe7dd248b1c16f943f273a3e674f22 and fixed in 6.17-rc4 with commit 799766208f09f95677a9ab111b93872d414fbad7 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-2025-39815 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: arch/riscv/kvm/vcpu_vector.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/c76bf8359188a11f8fd790e5bbd6077894a245cc https://git.kernel.org/stable/c/6d28659b692a0212f360f8bd8a58712b339f9aac https://git.kernel.org/stable/c/799766208f09f95677a9ab111b93872d414fbad7