CVE: CVE-2024-26841
Published: 2024-04-17
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[PII_REDACTED]4c302c ra[PII_REDACTED]4c302c tp[PII_REDACTED]5bc000 sp[PII_REDACTED]5bfd20
a0[PII_REDACTED]00001b a[PII_REDACTED]24c278 a2[PII_REDACTED]5bfb58 a3[PII_REDACTED]24c280
a4[PII_REDACTED]24c278 a5[PII_REDACTED]5bfb50 a6 [PII_REDACTED] a7 [PII_REDACTED]
t0 ce87a4763eb5234a t1 ce87a4763eb5234a t2 [PII_REDACTED] t3 [PII_REDACTED]
t4 [PII_REDACTED] t5 [PII_REDACTED] t6 [PII_REDACTED] t7 [PII_REDACTED]
t8[PII_REDACTED]09ebf6 u0[PII_REDACTED]f2a068 s9 [PII_REDACTED] s0[PII_REDACTED]46a2d8
s1 ffffffffffffffff s2 ffffffffffffffff s3[PII_REDACTED]1518c0 s4 [PII_REDACTED]
s5 [PII_REDACTED] s6[PII_REDACTED]828e40 s7[PII_REDACTED]0000b4 s8 [PII_REDACTED]
   ra:[PII_REDACTED]4c302c __static_key_slow_dec_cpuslocked+0xec/0x100
  ERA:[PII_REDACTED]4c302c __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 : [PII_REDACTED][PII_REDACTED]03f[PII_REDACTED]00179afc8[PII_REDACTED]5bc000
       [PII_REDACTED]5bf980 [PII_REDACTED][PII_REDACTED]5bf[PII_REDACTED]001fe0be0
       [PII_REDACTED]24c[PII_REDACTED]00224c[PII_REDACTED]1005bf8c0 [PII_REDACTED]
        [PII_REDACTED] ce87a4763eb5234a[PII_REDACTED]f38[PII_REDACTED]1003f8cc0
        [PII_REDACTED] [PII_REDACTED] [PII_REDACTED] 4c206e6f73676e6f
        6f4c203a656d616e[PII_REDACTED]09ec99[PII_REDACTED]f38000 [PII_REDACTED]
       [PII_REDACTED]14b[PII_REDACTED]001fe0be0 [PII_REDACTED] [PII_REDACTED]
        [PII_REDACTED] [PII_REDACTED] ffffffffffafdabe[PII_REDACTED]0000b4
        [PII_REDACTED][PII_REDACTED]4c302c [PII_REDACTED][PII_REDACTED]9a0c7c
       [PII_REDACTED]0000b0 [PII_REDACTED] [PII_REDACTED][PII_REDACTED]071c1c
        ...
Call Trace:
[<[PII_REDACTED]>] show_stack+0x48/0x1a0
[<[PII_REDACTED]79afc8>] dump_stack_lvl+0x78/0xa0
[<[PII_REDACTED]263ed0>] __warn+0x90/0x1a0
[<[PII_REDACTED]7419b8>] report_bug+0x1b8/0x280
[<[PII_REDACTED]79c564>] do_bp+0x264/0x420
[<[PII_REDACTED]4c302c>] __static_key_slow_dec_cpuslocked+0xec/0x100
[<[PII_REDACTED]2b4d7c>] sched_cpu_deactivate+0x2fc/0x300
[<[PII_REDACTED]>] cpuhp_invoke_callback+0x178/0x8a0
[<[PII_REDACTED]267f70>] cpuhp_thread_fun+0xf0/0x240
[<[PII_REDACTED]2a117c>] smpboot_thread_fn+0x1dc/0x2e0
[<[PII_REDACTED]29a720>] kthread+0x140/0x160
[<[PII_REDACTED]>] ret_from_kernel_thread+0xc/0xa4
CVSS Score: 5.5 (MEDIUM)
CWE: CWE-459
References: https://git.kernel.org/stable/c/0d862db64d26c2905ba1a6a8561466b215b664c2; https://git.kernel.org/stable/c/752cd08da320a667a833803a8fd6bb266114cce5; https://git.kernel.org/stable/c/b1ec3d6b86fdd057559a5908e6668279bf770e0e