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 4D17A3191D1 for ; Fri, 5 Sep 2025 17:24:10 +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=1757093051; cv=none; b=EO2xxrJQ+nFw8e7iMrHpAb7CYqq/VOrxn2uBHEVd0ZV/J0D7btPWdcxe7SDPUeCmNJzKE99Hte9adRw+YvmzGwPdCX/3oNgP3EfCTfJu2xJbXtTYBjNjCBGuvCpYvryr7gUr/MWnZs5JrX6ywaQovyJoj8spkyW4ORaK7n8nV40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757093051; c=relaxed/simple; bh=2fZzSEVq5CW1y9KXCFba7nFqmzG0mtB+UyZ4BKdMGlQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Q80IKXtxt1smW7pPljXwpzIPgsHB/MZDv6apkdW2QcCalIfGimsqhXbh7IHrGrePJ+bwEctEAtfljkoHpBwELRDGdJQCPQz+QPhwQjag8CjQUZXV/O4IzjYSZRWK+G3Bqw1nkQMyVYqFtMmXVk2yHl605Yr3k/v56IxEtHsKgk4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YeHt2vcv; 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="YeHt2vcv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71C75C4CEF1; Fri, 5 Sep 2025 17:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757093050; bh=2fZzSEVq5CW1y9KXCFba7nFqmzG0mtB+UyZ4BKdMGlQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=YeHt2vcvDMMvS8fSMbXbtIJrxjz06YIVTIoUL8XNAsPVKgWXHUXAx2r4j3/++RjT0 rCmwjT0YH4+5Lk3+594Rnzt3uojTB5yRBW7sYw0zC9HMUqWDqcefmBH9bFQ46UkXq4 6hbOqfTGntX58pBeqPjvENSyFudQW/gjxo9atb0o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39722: crypto: caam - Prevent crash on suspend with iMX8QM / iMX8ULP Date: Fri, 5 Sep 2025 19:21:35 +0200 Message-ID: <2025090552-CVE-2025-39722-db08@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=4410; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=O7ZzfSlO1kNn0ujaZuJFaGhl2t80LFvUYc+PaEmmSu8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBm7pb/MWyx5+xMj+6aT576/r8mUzX0YLPRC4tnDdb7nG UM/9wq4dMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE2nYxzC8R+1smyrG/6/H1 wr9Xs+ewJLLLrGWYH1jp32NsKvTlmpser+XPWXMk+vUWAwA= 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: crypto: caam - Prevent crash on suspend with iMX8QM / iMX8ULP Since the CAAM on these SoCs is managed by another ARM core, called the SECO (Security Controller) on iMX8QM and Secure Enclave on iMX8ULP, which also reserves access to register page 0 suspend operations cannot touch this page. This is similar to when running OPTEE, where OPTEE will reserve page 0. Track this situation using a new state variable no_page0, reflecting if page 0 is reserved elsewhere, either by other management cores in SoC or by OPTEE. Replace the optee_en check in suspend/resume with the new check. optee_en cannot go away as it's needed elsewhere to gate OPTEE specific situations. Fixes the following splat at suspend: Internal error: synchronous external abort: 0000000096000010 [#1] SMP Hardware name: Freescale i.MX8QXP ACU6C (DT) pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : readl+0x0/0x18 lr : rd_reg32+0x18/0x3c sp : ffffffc08192ba20 x29: ffffffc08192ba20 x28: ffffff8025190000 x27: 0000000000000000 x26: ffffffc0808ae808 x25: ffffffc080922338 x24: ffffff8020e89090 x23: 0000000000000000 x22: ffffffc080922000 x21: ffffff8020e89010 x20: ffffffc080387ef8 x19: ffffff8020e89010 x18: 000000005d8000d5 x17: 0000000030f35963 x16: 000000008f785f3f x15: 000000003b8ef57c x14: 00000000c418aef8 x13: 00000000f5fea526 x12: 0000000000000001 x11: 0000000000000002 x10: 0000000000000001 x9 : 0000000000000000 x8 : ffffff8025190870 x7 : ffffff8021726880 x6 : 0000000000000002 x5 : ffffff80217268f0 x4 : ffffff8021726880 x3 : ffffffc081200000 x2 : 0000000000000001 x1 : ffffff8020e89010 x0 : ffffffc081200004 Call trace: readl+0x0/0x18 caam_ctrl_suspend+0x30/0xdc dpm_run_callback.constprop.0+0x24/0x5c device_suspend+0x170/0x2e8 dpm_suspend+0xa0/0x104 dpm_suspend_start+0x48/0x50 suspend_devices_and_enter+0x7c/0x45c pm_suspend+0x148/0x160 state_store+0xb4/0xf8 kobj_attr_store+0x14/0x24 sysfs_kf_write+0x38/0x48 kernfs_fop_write_iter+0xb4/0x178 vfs_write+0x118/0x178 ksys_write+0x6c/0xd0 __arm64_sys_write+0x14/0x1c invoke_syscall.constprop.0+0x64/0xb0 do_el0_svc+0x90/0xb0 el0_svc+0x18/0x44 el0t_64_sync_handler+0x88/0x124 el0t_64_sync+0x150/0x154 Code: 88dffc21 88dffc21 5ac00800 d65f03c0 (b9400000) The Linux kernel CVE team has assigned CVE-2025-39722 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit d2835701d93cae6d597672ef9dc3fa889867031a and fixed in 6.12.44 with commit f9534674ce53f133c91c272f091f0242932574ae Issue introduced in 6.10 with commit d2835701d93cae6d597672ef9dc3fa889867031a and fixed in 6.16.4 with commit 488ed465e579a20485f38080e4ef8b90b69ef7c0 Issue introduced in 6.10 with commit d2835701d93cae6d597672ef9dc3fa889867031a and fixed in 6.17-rc1 with commit 5ffc47feddcf8eb4d8ac7b42111a02c8e8146512 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-39722 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/crypto/caam/ctrl.c drivers/crypto/caam/intern.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/f9534674ce53f133c91c272f091f0242932574ae https://git.kernel.org/stable/c/488ed465e579a20485f38080e4ef8b90b69ef7c0 https://git.kernel.org/stable/c/5ffc47feddcf8eb4d8ac7b42111a02c8e8146512