CVE-2021-47454: powerpc/smp: do not decrement idle task preempt count in CPU offline
In the Linux kernel, the following vulnerability has been resolved:
powerpc/smp: do not decrement idle task preempt count in CPU offline
With PREEMPT_COUNT=y, when a CPU is offlined and then onlined again, we
get:
BUG: scheduling while atomic: swapper/1/0/0x00000000
no locks held by swapper/1/0.
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.15.0-rc2+ #100
Call Trace:
dump_stack_lvl+0xac/0x108
__schedule_bug+0xac/0xe0
__schedule+0xcf8/0x10d0
schedule_idle+0x3c/0x70
do_idle+0x2d8/0x4a0
cpu_startup_entry+0x38/0x40
start_secondary+0x2ec/0x3a0
start_secondary_prolog+0x10/0x14
This is because powerpc's arch_cpu_idle_dead() decrements the idle task's
preempt count, for reasons explained in commit a7c2bb8279d2 ("powerpc:
Re-enable preemption before cpu_die()"), specifically "start_secondary()
expects a preempt_count() of 0."
However, since commit 2c669ef6979c ("powerpc/preempt: Don't touch the idle
task's preempt_count during hotplug") and commit f1a0a376ca0c ("sched/core:
Initialize the idle task with preemption disabled"), that justification no
longer holds.
The idle task isn't supposed to re-enable preemption, so remove the
vestigial preempt_enable() from the CPU offline path.
Tested with pseries and powernv in qemu, and pseries on PowerVM.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel bug in the powerpc CPU offline path. On affected systems, taking a CPU offline and bringing it back online can leave scheduling state inconsistent and trigger a kernel scheduling error. The available sources do not show remote exploitation, active exploitation, or data compromise.
Executive priority
Treat this as a targeted reliability issue for powerpc Linux infrastructure. Prioritize patching where CPU hotplug is used or where kernel instability could affect critical services.
Technical view
In powerpc SMP code, arch_cpu_idle_dead() wrongly decremented the idle task preempt count after scheduler changes made that behavior obsolete. With PREEMPT_COUNT enabled, CPU offline/online can produce “scheduling while atomic” in the idle task. The fix removes the vestigial preempt_enable() from the CPU offline path.
Likely exposure
Exposure appears limited to Linux powerpc deployments running affected kernel versions or downstream kernels carrying the vulnerable code, especially environments using CPU hotplug, virtualization, or maintenance workflows that offline and online CPUs.
Exploitation context
CISA KEV is false, and the supplied sources do not report public exploitation. The described failure requires CPU offline and online behavior on affected powerpc kernels, suggesting operational disruption risk rather than confirmed attacker-driven compromise.
Researcher notes
The evidence identifies root cause, affected kernel ranges, and upstream stable fix references, but provides no CVSS, CWE, exploit report, or vendor-specific package mapping. Validate exposure against downstream kernel backports rather than version strings alone.
Mitigation direction
Update affected powerpc Linux kernels to vendor builds containing the referenced stable fixes.
Check distribution advisories for backported fixes matching your kernel package.
Prioritize systems that use CPU hotplug, virtualization, or dynamic CPU maintenance workflows.
Follow vendor guidance for any supported interim operational mitigations.
Validation and detection
Inventory powerpc Linux hosts and record kernel versions and vendor package revisions.
Check whether affected systems enable PREEMPT_COUNT and CPU hotplug functionality.
Verify installed kernels include the referenced upstream stable commits or vendor-equivalent backports.
Review logs for “scheduling while atomic” during CPU offline or online events.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47454 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.