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 616852EBDC9 for ; Fri, 25 Jul 2025 12:48:49 +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=1753447729; cv=none; b=j0PT65J2kSkaz5oS/yom/bxN+PWJno4fZe9ZEIdDs+955tTfSxvoNbguivoPmrKBX6qSS6Qr0+Kl/ZtM3rJz1eWTH1jXMaPGo2AAULPoHt/URd5L38rLUBGwMdfHh26Np49QhNYnhxt22wmCbPy0wXysVHuHE4kX5Hsca7Y+7yE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753447729; c=relaxed/simple; bh=NkMENz4BFQf+oJFDgT5vc7V3JhKvwCkhZIJBxGpxzTU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=D5beTNk5BJumE5BZZBCMRIJPNVpApSYPjVlIO/pM4d8tdFiA/rM9x7iEeSP50xvFuYaBYGVdbAbbRY3U+64Vlv9HGhS2+QNvvoz1kewM5z7CPz+spYiuPOOzLLwrswWvvTKTCMatBUVUQ4eeWQAtpkhG1LU7YDhvz2PHlTjBuwo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fI/C7JhU; 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="fI/C7JhU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C396AC4CEE7; Fri, 25 Jul 2025 12:48:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753447729; bh=NkMENz4BFQf+oJFDgT5vc7V3JhKvwCkhZIJBxGpxzTU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fI/C7JhU4hTlODa2cx5ivjt7Y5J7Jpjol2P60dCiOPzbJDSrIbXF9BGmd2sFAr7yx xPlIKsOTzl1aiZLNYV0MHwo+K6vFGIblIMI2oaKuXvYh5WKWVIoMOinivYOA1TB2eH K86dqANlzrJBtwhQNDLkNdaUKtQYLNTDA0GjyLRQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38359: s390/mm: Fix in_atomic() handling in do_secure_storage_access() Date: Fri, 25 Jul 2025 14:48:00 +0200 Message-ID: <2025072556-CVE-2025-38359-8cda@gregkh> X-Mailer: git-send-email 2.50.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=3496; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3+5zXkFk7mEk4qq4HhvHNCzgyGayTVNvfaGTWTfrD0s=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNNX9Wrsg16BT4o3u/Ijv/tFzuV6Og5QEHXr1992fTl merauw9OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAipgsYFqyZqr3kseqxgzPK Hs7gCtjapcPd7sYw30coRzsvWbT8kOSbL/MvO/8VKzpwFgA= 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: s390/mm: Fix in_atomic() handling in do_secure_storage_access() Kernel user spaces accesses to not exported pages in atomic context incorrectly try to resolve the page fault. With debug options enabled call traces like this can be seen: BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1523 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 419074, name: qemu-system-s39 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [<00000383ea47cfa2>] copy_page_from_iter_atomic+0xa2/0x8a0 CPU: 12 UID: 0 PID: 419074 Comm: qemu-system-s39 Tainted: G W 6.16.0-20250531.rc0.git0.69b3a602feac.63.fc42.s390x+debug #1 PREEMPT Tainted: [W]=WARN Hardware name: IBM 3931 A01 703 (LPAR) Call Trace: [<00000383e990d282>] dump_stack_lvl+0xa2/0xe8 [<00000383e99bf152>] __might_resched+0x292/0x2d0 [<00000383eaa7c374>] down_read+0x34/0x2d0 [<00000383e99432f8>] do_secure_storage_access+0x108/0x360 [<00000383eaa724b0>] __do_pgm_check+0x130/0x220 [<00000383eaa842e4>] pgm_check_handler+0x114/0x160 [<00000383ea47d028>] copy_page_from_iter_atomic+0x128/0x8a0 ([<00000383ea47d016>] copy_page_from_iter_atomic+0x116/0x8a0) [<00000383e9c45eae>] generic_perform_write+0x16e/0x310 [<00000383e9eb87f4>] ext4_buffered_write_iter+0x84/0x160 [<00000383e9da0de4>] vfs_write+0x1c4/0x460 [<00000383e9da123c>] ksys_write+0x7c/0x100 [<00000383eaa7284e>] __do_syscall+0x15e/0x280 [<00000383eaa8417e>] system_call+0x6e/0x90 INFO: lockdep is turned off. It is not allowed to take the mmap_lock while in atomic context. Therefore handle such a secure storage access fault as if the accessed page is not mapped: the uaccess function will return -EFAULT, and the caller has to deal with this. Usually this means that the access is retried in process context, which allows to resolve the page fault (or in this case export the page). The Linux kernel CVE team has assigned CVE-2025-38359 to this issue. Affected and fixed versions =========================== Fixed in 6.15.5 with commit d2e317dfd2d1fe416c77315d17c5d57dbe374915 Fixed in 6.16-rc1 with commit 11709abccf93b08adde95ef313c300b0d4bc28f1 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-38359 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/s390/mm/fault.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/d2e317dfd2d1fe416c77315d17c5d57dbe374915 https://git.kernel.org/stable/c/11709abccf93b08adde95ef313c300b0d4bc28f1