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 E78F1208973 for ; Thu, 6 Mar 2025 16:22:42 +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=1741278163; cv=none; b=koj+MEdAf3ByYxf8zKV5QPO88Bc1jKAWqMyKBq2zdcYm84KndnjOZ8BkON2rS32gCACmpWHfx3zOc1CoBqBVTQOyKS2YlC+/dZBvyaqDbPTxe7Iqi4P3UoEzaPZmv/4rXfJ31q8VKzrENUK1q6dvrBAFiMgR3/JnwJ8oNeLvMiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741278163; c=relaxed/simple; bh=fB74ZmcSGH1AZt6AOGPF1l0VqVZVWe50N3qLH95Q4Fc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Tb7wC7nOujD5cJdoZlTUzw/uQomw7x0RpzNs6cf8umwfehVQMbPCmpofj15nSSbsqaETt++xE8+LquQigcnUYv1YcDdfsBERFAmQFZlMbAvQqfKjF6xnq6SI9fcKmTMPSmQ0WGjrujCiE17gBbV4oQPl7hr003sseO0JdN4OFAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mK1tkx9o; 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="mK1tkx9o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48785C4CEE0; Thu, 6 Mar 2025 16:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741278162; bh=fB74ZmcSGH1AZt6AOGPF1l0VqVZVWe50N3qLH95Q4Fc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mK1tkx9opXPOkTykIizCg7MWZCiM0WGBqesTA5HaeG+w4Rimf37Ppz3GQ2NX6jncP uLMx2xAnNf8+os5lJMH6I7fdz7lrhAMx6wlnDZYPgRf/U0obk72ocQr4pyHrt1DkRw qjv1SFe8PmycLYJPkGC+kcPkWE6NcKlq8iA2wZOc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-58084: firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() Date: Thu, 6 Mar 2025 17:22:35 +0100 Message-ID: <2025030634-CVE-2024-58084-16e9@gregkh> X-Mailer: git-send-email 2.48.1 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=2808; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fB74ZmcSGH1AZt6AOGPF1l0VqVZVWe50N3qLH95Q4Fc=; b=owGbwMvMwCRo6H6F97bub03G02pJDOknT5/6GfedYd2C+y/+zU0MOiQe2ctR/FrrY6+LxtLgq ucJ9XM8O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiTaEMC1qdfgROe7A1ZO6v 9CMu3Zkc/idzgxnmp9zcPunVEd7DuW4lwoL6N7fs11z9EAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() Commit 2e4955167ec5 ("firmware: qcom: scm: Fix __scm and waitq completion variable initialization") introduced a write barrier in probe function to store global '__scm' variable. We all known barriers are paired (see memory-barriers.txt: "Note that write barriers should normally be paired with read or address-dependency barriers"), therefore accessing it from concurrent contexts requires read barrier. Previous commit added such barrier in qcom_scm_is_available(), so let's use that directly. Lack of this read barrier can result in fetching stale '__scm' variable value, NULL, and dereferencing it. Note that barrier in qcom_scm_is_available() satisfies here the control dependency. The Linux kernel CVE team has assigned CVE-2024-58084 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 449d0d84bcd8246b508d07995326d13c54488b8c and fixed in 6.12.14 with commit fee921e3c641f64185abee83f9a6e65f0b380682 Issue introduced in 6.11 with commit 449d0d84bcd8246b508d07995326d13c54488b8c and fixed in 6.13.3 with commit e03db7c1255ebabba5e1a447754faeb138de15a2 Issue introduced in 6.11 with commit 449d0d84bcd8246b508d07995326d13c54488b8c and fixed in 6.14-rc1 with commit b628510397b5cafa1f5d3e848a28affd1c635302 Issue introduced in 6.11.8 with commit 3d36e2b1d803f0d1cc674115d295a8f20ddb9268 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-2024-58084 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/qcom/qcom_scm.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/fee921e3c641f64185abee83f9a6e65f0b380682 https://git.kernel.org/stable/c/e03db7c1255ebabba5e1a447754faeb138de15a2 https://git.kernel.org/stable/c/b628510397b5cafa1f5d3e848a28affd1c635302