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 D0C2713A885 for ; Wed, 17 Apr 2024 10:11:03 +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=1713348663; cv=none; b=ul+S7kd/wKJr1wf5F36JmgHXx3HW+OvZOEIa2BUHbZdVTwzYUy5rXFMNiLJnlwhZl/Ht331gv11RaWyYgpTx/u44nANdJjlOkrdWlqQvXeCAuurfoSfFQAe9YXKFfON5/jafuIWYQq4bLxdHMZBOWe8hzQSFwZ6x8pWJZM0gex4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713348663; c=relaxed/simple; bh=Sa9BkSpMMJOvCdZD5zdH0GKMS/yIkEkkdusVboTGu0I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TkUsXsjjk7Zjz++CxWEZL1xx1x+ohEy5RzuBtcaI34EHfwOApJAMhoCFIhL/VZfaPJAGWewapYwC+taZJhvl1zdTG6V2FVwWQrForEEA4j6pKoyzY8UWi97fSOuSv+0Pv++0gnW90P5CIIZSwsAsPowPnlOmsJIT47L+EVKG6BQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VaTM0cZy; 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="VaTM0cZy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54F49C072AA; Wed, 17 Apr 2024 10:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713348663; bh=Sa9BkSpMMJOvCdZD5zdH0GKMS/yIkEkkdusVboTGu0I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VaTM0cZyhjgm8MyAKxrHa5aQHisEVjU9VtNAQ5uxmCI980uN0+BdhHzAFMWfUWpNg l2AibZ/7DD/fecGYoNWQ1ZOmzNl3/3loyb10Q2jkqg4vbP88eP4IKP8rgionw3w5yi 8/7xVtzFuEE2gXzbtd+/V8H4H046An+Ct1TlirGQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26841: LoongArch: Update cpu_sibling_map when disabling nonboot CPUs Date: Wed, 17 Apr 2024 12:10:23 +0200 Message-ID: <2024041716-CVE-2024-26841-6433@gregkh> X-Mailer: git-send-email 2.44.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=4501; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Sa9BkSpMMJOvCdZD5zdH0GKMS/yIkEkkdusVboTGu0I=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyCzgen1v8u8xs4QtRSW6h59kdzYVCR39XcDmXsNTe3 h25QHF3RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExk5n2GeSa/Vlcbdx1SnMnS pj9jzbkJt6tVhBnmO+dfUers3sD9x36vdejrD33qW/TbAQ== 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: LoongArch: Update cpu_sibling_map when disabling nonboot CPUs Update cpu_sibling_map when disabling nonboot CPUs by defining & calling clear_cpu_sibling_map(), otherwise we get such errors on SMT systems: jump label: negative count! WARNING: CPU: 6 PID: 45 at kernel/jump_label.c:263 __static_key_slow_dec_cpuslocked+0xec/0x100 CPU: 6 PID: 45 Comm: cpuhp/6 Not tainted 6.8.0-rc5+ #1340 pc 90000000004c302c ra 90000000004c302c tp 90000001005bc000 sp 90000001005bfd20 a0 000000000000001b a1 900000000224c278 a2 90000001005bfb58 a3 900000000224c280 a4 900000000224c278 a5 90000001005bfb50 a6 0000000000000001 a7 0000000000000001 t0 ce87a4763eb5234a t1 ce87a4763eb5234a t2 0000000000000000 t3 0000000000000000 t4 0000000000000006 t5 0000000000000000 t6 0000000000000064 t7 0000000000001964 t8 000000000009ebf6 u0 9000000001f2a068 s9 0000000000000000 s0 900000000246a2d8 s1 ffffffffffffffff s2 ffffffffffffffff s3 90000000021518c0 s4 0000000000000040 s5 9000000002151058 s6 9000000009828e40 s7 00000000000000b4 s8 0000000000000006 ra: 90000000004c302c __static_key_slow_dec_cpuslocked+0xec/0x100 ERA: 90000000004c302c __static_key_slow_dec_cpuslocked+0xec/0x100 CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) PRMD: 00000004 (PPLV0 +PIE -PWE) EUEN: 00000000 (-FPE -SXE -ASXE -BTE) ECFG: 00071c1c (LIE=2-4,10-12 VS=7) ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0) PRID: 0014d000 (Loongson-64bit, Loongson-3A6000-HV) CPU: 6 PID: 45 Comm: cpuhp/6 Not tainted 6.8.0-rc5+ #1340 Stack : 0000000000000000 900000000203f258 900000000179afc8 90000001005bc000 90000001005bf980 0000000000000000 90000001005bf988 9000000001fe0be0 900000000224c280 900000000224c278 90000001005bf8c0 0000000000000001 0000000000000001 ce87a4763eb5234a 0000000007f38000 90000001003f8cc0 0000000000000000 0000000000000006 0000000000000000 4c206e6f73676e6f 6f4c203a656d616e 000000000009ec99 0000000007f38000 0000000000000000 900000000214b000 9000000001fe0be0 0000000000000004 0000000000000000 0000000000000107 0000000000000009 ffffffffffafdabe 00000000000000b4 0000000000000006 90000000004c302c 9000000000224528 00005555939a0c7c 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1c ... Call Trace: [<9000000000224528>] show_stack+0x48/0x1a0 [<900000000179afc8>] dump_stack_lvl+0x78/0xa0 [<9000000000263ed0>] __warn+0x90/0x1a0 [<90000000017419b8>] report_bug+0x1b8/0x280 [<900000000179c564>] do_bp+0x264/0x420 [<90000000004c302c>] __static_key_slow_dec_cpuslocked+0xec/0x100 [<90000000002b4d7c>] sched_cpu_deactivate+0x2fc/0x300 [<9000000000266498>] cpuhp_invoke_callback+0x178/0x8a0 [<9000000000267f70>] cpuhp_thread_fun+0xf0/0x240 [<90000000002a117c>] smpboot_thread_fn+0x1dc/0x2e0 [<900000000029a720>] kthread+0x140/0x160 [<9000000000222288>] ret_from_kernel_thread+0xc/0xa4 The Linux kernel CVE team has assigned CVE-2024-26841 to this issue. Affected and fixed versions =========================== Fixed in 6.6.19 with commit b1ec3d6b86fd Fixed in 6.7.7 with commit 0d862db64d26 Fixed in 6.8 with commit 752cd08da320 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-26841 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/loongarch/kernel/smp.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/b1ec3d6b86fdd057559a5908e6668279bf770e0e https://git.kernel.org/stable/c/0d862db64d26c2905ba1a6a8561466b215b664c2 https://git.kernel.org/stable/c/752cd08da320a667a833803a8fd6bb266114cce5