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 0DD35217F34 for ; Wed, 18 Jun 2025 11:02: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=1750244542; cv=none; b=fTE29Eil12ZYJuX8Cyl3aLivtRnSPsGezqqyc5tsrh3R9cI0T6z+NaxPMCwiTSah8RIXcOwvFMJ8SVOzVrbLangjdFe4TVFEdayL0ct/GrDq59UG2Fy1nfa+JQDk1Lb6Ebf9NmCu9HmGopuri2rkY4h9G+kjTgc241dMybzLYj4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244542; c=relaxed/simple; bh=YKV5DmS8+tBjoXYNReFA7b8R5Z8Iiz96j2JlWf4O6Tg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HZ4ntkq4Q/qR+YZsVdAumnYQOxUO+k3Yj/7ZWloZKsr41IyQwOPF8s5dKl3uHQyqhNpHlxmWqQD4l/07hoKeqTWmy9vFURq3C6jLL6L+2Q/eZpGhWj8SNUONCm9KzKS6pbjUvG+FCf9WwyQ0DlllVIKgSboCpzHf/lp8sbmg5Q4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KDwNpHBe; 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="KDwNpHBe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 707A5C4CEE7; Wed, 18 Jun 2025 11:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244541; bh=YKV5DmS8+tBjoXYNReFA7b8R5Z8Iiz96j2JlWf4O6Tg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KDwNpHBeNp/ysFlfEMiQ7dWSJw4bmnyaMF0DQh+XFnOk2Oi/04/QSvMMzZjj0qV/P 1wS+3p3ZsJ9h2gOHuFTeceYZwpEWZ2nKhiq/PxxsQEZOk8O4RLk+GEEIfSXU20ZEur kLJMBQ1VwUFnUzGb/PdYS6PtK6NA2oeVTmSc7U08= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49955: powerpc/rtas: Fix RTAS MSR[HV] handling for Cell Date: Wed, 18 Jun 2025 13:00:20 +0200 Message-ID: <2025061811-CVE-2022-49955-500b@gregkh> X-Mailer: git-send-email 2.49.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=3573; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=xC2nqJnohrIKpaAtUGXmrcV6XxlgiyassUGG5dUe0cQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc2ym361/4K+g4PyrP09owjFXk+R9Pgw3XWv/b9HZm /g54OfyjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIcRbDPOPD5cVdgYpLrj27 NnPHDR7ZFpcOZ4b5EfPV5ousK3G7LFSlfr73hVFeG3MVAA== 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: powerpc/rtas: Fix RTAS MSR[HV] handling for Cell The semi-recent changes to MSR handling when entering RTAS (firmware) cause crashes on IBM Cell machines. An example trace: kernel tried to execute user page (2fff01a8) - exploit attempt? (uid: 0) BUG: Unable to handle kernel instruction fetch Faulting instruction address: 0x2fff01a8 Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=4 NUMA Cell Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.0.0-rc2-00433-gede0a8d3307a #207 NIP: 000000002fff01a8 LR: 0000000000032608 CTR: 0000000000000000 REGS: c0000000015236b0 TRAP: 0400 Tainted: G W (6.0.0-rc2-00433-gede0a8d3307a) MSR: 0000000008001002 CR: 00000000 XER: 20000000 ... NIP 0x2fff01a8 LR 0x32608 Call Trace: 0xc00000000143c5f8 (unreliable) .rtas_call+0x224/0x320 .rtas_get_boot_time+0x70/0x150 .read_persistent_clock64+0x114/0x140 .read_persistent_wall_and_boot_offset+0x24/0x80 .timekeeping_init+0x40/0x29c .start_kernel+0x674/0x8f0 start_here_common+0x1c/0x50 Unlike PAPR platforms where RTAS is only used in guests, on the IBM Cell machines Linux runs with MSR[HV] set but also uses RTAS, provided by SLOF. Fix it by copying the MSR[HV] bit from the MSR value we've just read using mfmsr into the value used for RTAS. It seems like we could also fix it using an #ifdef CELL to set MSR[HV], but that doesn't work because it's possible to build a single kernel image that runs on both Cell native and pseries. The Linux kernel CVE team has assigned CVE-2022-49955 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit b6b1c3ce06ca438eb24e0f45bf0e63ecad0369f5 and fixed in 5.19.8 with commit 8b08d4f97233d8e58fff2fd9d5f86397a49733c5 Issue introduced in 5.19 with commit b6b1c3ce06ca438eb24e0f45bf0e63ecad0369f5 and fixed in 6.0 with commit 91926d8b7e71aaf5f84f0cf208fc5a8b7a761050 Issue introduced in 5.15.46 with commit 5ca40fcf0da0ce2b5bc44e7d8b036535955f2e3d Issue introduced in 5.17.14 with commit 5f4367448f6817c8a0e94dc9736ed84fa8eee4a3 Issue introduced in 5.18.3 with commit c9c41f0273826a13ac93124e66a4ff45df281ba0 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-2022-49955 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/powerpc/kernel/rtas_entry.S 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/8b08d4f97233d8e58fff2fd9d5f86397a49733c5 https://git.kernel.org/stable/c/91926d8b7e71aaf5f84f0cf208fc5a8b7a761050