LiveActive security incident?Get immediate response
CVE Record

CVE-2021-47465: KVM: PPC: Book3S HV: Fix stack handling in idle_kvm_start_guest()

In the Linux kernel, the following vulnerability has been resolved: KVM: PPC: Book3S HV: Fix stack handling in idle_kvm_start_guest() In commit 10d91611f426 ("powerpc/64s: Reimplement book3s idle code in C") kvm_start_guest() became idle_kvm_start_guest(). The old code allocated a stack frame on the emergency stack, but didn't use the frame to store anything, and also didn't store anything in its caller's frame. idle_kvm_start_guest() on the other hand is written more like a normal C function, it creates a frame on entry, and also stores CR/LR into its callers frame (per the ABI). The problem is that there is no caller frame on the emergency stack. The emergency stack for a given CPU is allocated with: paca_ptrs[i]->emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; So emergency_sp actually points to the first address above the emergency stack allocation for a given CPU, we must not store above it without first decrementing it to create a frame. This is different to the regular kernel stack, paca->kstack, which is initialised to point at an initial frame that is ready to use. idle_kvm_start_guest() stores the backchain, CR and LR all of which write outside the allocation for the emergency stack. It then creates a stack frame and saves the non-volatile registers. Unfortunately the frame it creates is not large enough to fit the non-volatiles, and so the saving of the non-volatile registers also writes outside the emergency stack allocation. The end result is that we corrupt whatever is at 0-24 bytes, and 112-248 bytes above the emergency stack allocation. In practice this has gone unnoticed because the memory immediately above the emergency stack happens to be used for other stack allocations, either another CPUs mc_emergency_sp or an IRQ stack. See the order of calls to irqstack_early_init() and emergency_stack_init(). The low addresses of another stack are the top of that stack, and so are only used if that stack is under extreme pressue, which essentially never happens in practice - and if it did there's a high likelyhood we'd crash due to that stack overflowing. Still, we shouldn't be corrupting someone else's stack, and it is purely luck that we aren't corrupting something else. To fix it we save CR/LR into the caller's frame using the existing r1 on entry, we then create a SWITCH_FRAME_SIZE frame (which has space for pt_regs) on the emergency stack with the backchain pointing to the existing stack, and then finally we switch to the new frame on the emergency stack.

HighCVSS 7.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A Linux kernel KVM bug on PowerPC Book3S HV can write outside a CPU emergency stack during guest start from idle. That can corrupt nearby stack memory, risking host integrity and availability. The CVE is high severity, but the supplied sources do not show active exploitation or a public exploit.

Executive priority

Treat as a high-priority infrastructure maintenance issue for PowerPC KVM environments. Urgency is lower for organizations without PowerPC Book3S HV KVM exposure, and the sources do not support an emergency active-exploitation response.

Technical view

idle_kvm_start_guest() behaved like a normal C function on an emergency stack that lacked a caller frame. It saved backchain, CR/LR, and non-volatile registers outside the allocation, corrupting memory above the stack. Fixes adjust frame creation and switching on the emergency stack.

Likely exposure

Exposure appears limited to Linux systems using KVM on PowerPC Book3S HV with affected Linux kernel versions or descendants of commit 10d91611f426. General x86 virtualization hosts are not identified as affected in the supplied sources.

Exploitation context

The CVSS vector is local, low complexity, low privileges, no user interaction, with high integrity and availability impact. CISA KEV status is false in the bundle, and no cited source states active exploitation.

Researcher notes

The bug is a kernel stack handling flaw, not a remotely reachable service issue. The description suggests accidental adjacent stack corruption that historically went unnoticed, but still creates integrity and availability risk. Evidence is insufficient to claim practical exploitability or exploitation in the wild.

Mitigation direction

  • Update affected Linux kernels using vendor or distribution guidance.
  • Confirm the fix is present through the linked stable kernel commits.
  • Prioritize PowerPC KVM hosts that run untrusted or multi-tenant workloads.
  • Track distro advisories for backported fixes and package-specific version mapping.

Validation and detection

  • Inventory Linux virtualization hosts using PowerPC Book3S HV KVM.
  • Compare running kernel source or package changelog against the linked stable fixes.
  • Check whether kernels descend from the affected commit or affected version ranges.
  • Review vendor advisories before treating a version number as definitively fixed.
Prepared
Confidence
medium
Sources
6

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-47465 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

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.

1CVSS vectors
3Timeline events
2ADP providers
5Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.1CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H1.85.2CISA-ADP

Vulnerability scoring details

Base CVSS 3.1 score

7.1High
CVSS 3.1 vector shape for CVE-2021-47465Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
CVECVE Program Container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux10d91611f426d4bafd2a83d966c36da811b2f7ad, 10d91611f426d4bafd2a83d966c36da811b2f7ad, 10d91611f426d4bafd2a83d966c36da811b2f7ad, 10d91611f426d4bafd2a83d966c36da811b2f7adunaffected
LinuxLinux5.2, 0, 5.4.156, 5.10.76, 5.14.15, 5.15affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.