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 E4D4A313297 for ; Tue, 16 Sep 2025 13:09:22 +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=1758028163; cv=none; b=cE/yVXIeRsYEr72LXNgWDPThD7iq9ZZSwrfwEU9IBrLx8NRptYGja+4IE++e0/gxBpfgklTt2zgKr77vQgv5ZC4AobGnpYhN98WKn2nsIOhoqsB9Jga2hWfjZniUI2oq7aBhIu/epSOCTAmRwDLMVIPsdOnZRDb67gPVA6SForA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758028163; c=relaxed/simple; bh=cViXtFQqj5LzeRQXtngNvasjvpx1nazBO/zlzOT7UjE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lTfKNUA1VggA02wiSFq1oESkBqP4hoM6zIk3xKnBDn8+LFbh5OwVRPaU6kFFbdFvxU5Ki0zq16MhgELuEx4TS9nDsyXt0/fH1lRGuDP5iJdeg03PBmbiTWBKMqQjptdth9yo24u+e0hNwx0aCg4KuM/QKlggrQ7BdIsjBqFKqME= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fwuccEBY; 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="fwuccEBY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D204C4CEEB; Tue, 16 Sep 2025 13:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758028162; bh=cViXtFQqj5LzeRQXtngNvasjvpx1nazBO/zlzOT7UjE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fwuccEBYNtu8vBtcOCmvVY/A2ds48v4DHgeVS76dOrgSj7a66+QlkLEBy+wwdUMq0 zsgH8BG5wtwQ/x9jMKFNtiEVSupcAgLQlxC2U5piveX//YBLz2sm5jRSUvMH+tEkdN 8Q7icPwyTPJe0OdaZYv1RKEdoApVym1dNK9hJOu4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39836: efi: stmm: Fix incorrect buffer allocation method Date: Tue, 16 Sep 2025 15:09:04 +0200 Message-ID: <2025091658-CVE-2025-39836-49ce@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=2425; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VuqdteggqW5HQNeqP5l33mJejkUHCNPg6AYOL/vXI0U=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknE7NeJK2fszte9/i7d7eL73CvZzly+t3aiR0GMY+eX LM6YzF5WUcsC4MgE4OsmCLLl208R/dXHFL0MrQ9DTOHlQlkCAMXpwBM5Egdw4KZRkqmbM3xRvpu fRs/brT9bNFeu5ZhvmOHx+yTc874h0ufKtv77TzTsZvFEwA= 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: efi: stmm: Fix incorrect buffer allocation method The communication buffer allocated by setup_mm_hdr() is later on passed to tee_shm_register_kernel_buf(). The latter expects those buffers to be contiguous pages, but setup_mm_hdr() just uses kmalloc(). That can cause various corruptions or BUGs, specifically since commit 9aec2fb0fd5e ("slab: allocate frozen pages"), though it was broken before as well. Fix this by using alloc_pages_exact() instead of kmalloc(). The Linux kernel CVE team has assigned CVE-2025-39836 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit c44b6be62e8dd4ee0a308c36a70620613e6fc55f and fixed in 6.12.45 with commit 77ff27ff0e4529a003c8a1c2492c111968c378d3 Issue introduced in 6.8 with commit c44b6be62e8dd4ee0a308c36a70620613e6fc55f and fixed in 6.16.5 with commit 630c0e6064daf84f17aad1a7d9ca76b562e3fe47 Issue introduced in 6.8 with commit c44b6be62e8dd4ee0a308c36a70620613e6fc55f and fixed in 6.17-rc4 with commit c5e81e672699e0c5557b2b755cc8f7a69aa92bff 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-39836 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: drivers/firmware/efi/stmm/tee_stmm_efi.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/77ff27ff0e4529a003c8a1c2492c111968c378d3 https://git.kernel.org/stable/c/630c0e6064daf84f17aad1a7d9ca76b562e3fe47 https://git.kernel.org/stable/c/c5e81e672699e0c5557b2b755cc8f7a69aa92bff