From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9A7063E1CF0 for ; Wed, 3 Jun 2026 16:04:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780502696; cv=none; b=GDatfF/3MmPLp/oV6qmS7nYE1yvnaAfszwAj+4jAVJNeq4jA5ljtRYpIOxulWt8UbBV7VjwiBsHL375aaBKgsGOQuertt7eH3/qP5icWRsXrkBQZm3QgMvFCsLWIhGqbGu+flvkVw7Dv1T022fQmjZtEK4FJ5+uc802u9IMUDz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780502696; c=relaxed/simple; bh=zXyuaEaGAAtONTliBbieQaDQRG52RqKxpM90FF9ujg8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YKci0vv9Xbj0HOA5qlCImnsF09icpJCX5XuoTdEUfec+fXEPUalsmrpxqMrpdg81UO/NgmG018ExzmZHAAzPLuUiojG2nn9S7+Gbzj09QLObT8eyRlDWd1tYshfC+fQrEfcIH2Ne3DteGKUorHvYtWPTLZ5Y3CjYPqcfVRPvMsY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Tqqiy848; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Tqqiy848" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80C5D1F00898; Wed, 3 Jun 2026 16:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780502694; bh=e4aLms4RkBN2oa967dmoeXPWlkb1auw4IFxaoLQFcCg=; h=From:To:Cc:Subject:Date:Reply-To; b=Tqqiy848Ej4H8LLbIHvZxxQawEgHrU9lXcJgVanR7Pikx3rG37rnuw0IOlDnnc3+J iUJIBFfQ1iRj6u53gbUyrkGNqSTA936Uj4YJT6mSJqvMNfcr7ORczh8S/BVSWJL8Pv FoRgBe0mWwTCJtZSPX7lZrG8tH1TZD3jtfOT/sIw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46250: MIPS: Work around LLVM bug when gp is used as global register variable Date: Wed, 3 Jun 2026 17:49:39 +0200 Message-ID: <2026060334-CVE-2026-46250-736e@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6090; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sPcJoLEJMjREGb389ohnDs6WTc6M6BPPjppmhI42C38=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkKvnzPyi4yznN0evJ2RUWc5wK7LscUu3f9M2+cu8Jfc czl9MSYjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIkyXDgk2tzGHiatZZv4KF d/7sbpxy5KvBFYY53BmfdjIG71U86eyvksupP7fxwD45AA== 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: MIPS: Work around LLVM bug when gp is used as global register variable On MIPS, __current_thread_info is defined as global register variable locating in $gp, and is simply assigned with new address during kernel relocation. This however is broken with LLVM, which always restores $gp if it finds $gp is clobbered in any form, including when intentionally through a global register variable. This is against GCC's documentation[1], which requires a callee-saved register used as global register variable not to be restored if it's clobbered. As a result, $gp will continue to point to the unrelocated kernel after the epilog of relocate_kernel(), leading to an early crash in init_idle, [ 0.000000] CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == ffffffff81afada8, ra == ffffffff81afad90 [ 0.000000] Oops[#1]: [ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper Tainted: G W 6.19.0-rc5-00262-gd3eeb99bbc99-dirty #188 VOLUNTARY [ 0.000000] Tainted: [W]=WARN [ 0.000000] Hardware name: loongson,loongson64v-4core-virtio [ 0.000000] $ 0 : 0000000000000000 0000000000000000 0000000000000001 0000000000000000 [ 0.000000] $ 4 : ffffffff80b80ec0 ffffffff80b53d48 0000000000000000 00000000000f4240 [ 0.000000] $ 8 : 0000000000000100 ffffffff81d82f80 ffffffff81d82f80 0000000000000001 [ 0.000000] $12 : 0000000000000000 ffffffff81776f58 00000000000005da 0000000000000002 [ 0.000000] $16 : ffffffff80b80e40 0000000000000000 ffffffff80b81614 9800000005dfbe80 [ 0.000000] $20 : 00000000540000e0 ffffffff81980000 0000000000000000 ffffffff80f81c80 [ 0.000000] $24 : 0000000000000a26 ffffffff8114fb90 [ 0.000000] $28 : ffffffff80b50000 ffffffff80b53d40 0000000000000000 ffffffff81afad90 [ 0.000000] Hi : 0000000000000000 [ 0.000000] Lo : 0000000000000000 [ 0.000000] epc : ffffffff81afada8 init_idle+0x130/0x270 [ 0.000000] ra : ffffffff81afad90 init_idle+0x118/0x270 [ 0.000000] Status: 540000e2 KX SX UX KERNEL EXL [ 0.000000] Cause : 00000008 (ExcCode 02) [ 0.000000] BadVA : 0000000000000000 [ 0.000000] PrId : 00006305 (ICT Loongson-3) [ 0.000000] Process swapper (pid: 0, threadinfo=(____ptrval____), task=(____ptrval____), tls=0000000000000000) [ 0.000000] Stack : 9800000005dfbf00 ffffffff8178e950 0000000000000000 0000000000000000 [ 0.000000] 0000000000000000 ffffffff81970000 000000000000003f ffffffff810a6528 [ 0.000000] 0000000000000001 9800000005dfbe80 9800000005dfbf00 ffffffff81980000 [ 0.000000] ffffffff810a6450 ffffffff81afb6c0 0000000000000000 ffffffff810a2258 [ 0.000000] ffffffff81d82ec8 ffffffff8198d010 ffffffff81b67e80 ffffffff8197dd98 [ 0.000000] ffffffff81d81c80 ffffffff81930000 0000000000000040 0000000000000000 [ 0.000000] 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 0.000000] 0000000000000000 000000000000009e ffffffff9fc01000 0000000000000000 [ 0.000000] 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 0.000000] 0000000000000000 ffffffff81ae86dc ffffffff81b3c741 0000000000000002 [ 0.000000] ... [ 0.000000] Call Trace: [ 0.000000] [] init_idle+0x130/0x270 [ 0.000000] [] sched_init+0x5c8/0x6c0 [ 0.000000] [] start_kernel+0x27c/0x7a8 This bug has been reported to LLVM[2] and affects version from (at least) 18 to 21. Let's work around this by using inline assembly to assign $gp before a fix is widely available. The Linux kernel CVE team has assigned CVE-2026-46250 to this issue. Affected and fixed versions =========================== Fixed in 5.10.252 with commit 05bff9b0ae095b2420cfebb4a96759a09334bec6 Fixed in 5.15.202 with commit 1fe3b402b1e97a1718df3be0a1d3eee20133e735 Fixed in 6.1.165 with commit 4dc65b40fb80c2020efbf139b9a38d30f9a37b92 Fixed in 6.6.128 with commit c0155dee51b9f5f48aaf5c71cae005eb0e36521f Fixed in 6.12.75 with commit e3a6498a63394218561065a9a7a597a204f52f6a Fixed in 6.18.14 with commit 561834f6d6f52b8a1791331e94b2aac753491d2a Fixed in 6.19.4 with commit 9bc3b0ae5203aba650297fdf3e1e774125e423f2 Fixed in 7.0 with commit 30bfc2d6a1132a89a5f1c3b96c59cf3e4d076ea3 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-2026-46250 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/mips/kernel/relocate.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/05bff9b0ae095b2420cfebb4a96759a09334bec6 https://git.kernel.org/stable/c/1fe3b402b1e97a1718df3be0a1d3eee20133e735 https://git.kernel.org/stable/c/4dc65b40fb80c2020efbf139b9a38d30f9a37b92 https://git.kernel.org/stable/c/c0155dee51b9f5f48aaf5c71cae005eb0e36521f https://git.kernel.org/stable/c/e3a6498a63394218561065a9a7a597a204f52f6a https://git.kernel.org/stable/c/561834f6d6f52b8a1791331e94b2aac753491d2a https://git.kernel.org/stable/c/9bc3b0ae5203aba650297fdf3e1e774125e423f2 https://git.kernel.org/stable/c/30bfc2d6a1132a89a5f1c3b96c59cf3e4d076ea3