CVE-2025-22013: KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state

Published Apr 8, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state

There are several problems with the way hyp code lazily saves the host's FPSIMD/SVE state, including:

Host SVE being discarded unexpectedly due to inconsistent configuration of TIFSVE and CPACRELx.ZEN. This has been seen to result in QEMU crashes where SVE is used by memmove(), as reported by Eric Auger:

https://issues.redhat.com/browse/RHEL-68997

Host SVE state is discarded after modification by ptrace, which was an unintentional ptrace ABI change introduced with lazy discarding of SVE state.

The host FPMR value can be discarded when running a non-protected VM, where FPMR support is not exposed to a VM, and that VM uses FPSIMD/SVE. In these cases the hyp code does not save the host's FPMR before unbinding the host's FPSIMD/SVE/SME state, leaving a stale value in memory.

Avoid these by eagerly saving and "flushing" the host's FPSIMD/SVE/SME state when loading a vCPU such that KVM does not need to save any of the host's FPSIMD/SVE/SME state. For clarity, fpsimdkvmprepare() is removed and the necessary call to fpsimdsaveandflushcpustate() is placed in kvmarchvcpuloadfp(). As 'fpsimdstate' and 'fpmrptr' should not be used, they are set to NULL; all uses of these will be removed in subsequent patches.

Historical problems go back at least as far as v5.17, e.g. erroneous assumptions about TIFSVE being clear in commit:

8383741ab2e773a9 ("KVM: arm64: Get rid of host SVE tracking/saving")

... and so this eager save+flush probably needs to be backported to ALL stable trees.

Affected Software

6 affected components
Linux Kernel
Linux Linux kernel>=6.2<6.6.85
Linux Linux kernel>=6.7<6.12.21
Linux Linux kernel>=6.13<6.13.9
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade KVM: arm64 to a version that resolves this vulnerability.

    Patch 8383741ab2e773a9
  2. Upgrade

    Upgrade KVM: arm64 to a version that resolves this vulnerability.

    Patch KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state
  3. Compensating control

    If running a non-protected VM where host FPMR support is not exposed to the VM, the host FPMR value can be discarded (avoid relying on host FPMR persistence).

  4. Compensating control

    Mitigate the QEMU crash scenario where SVE is used by memmove by ensuring eager save+flush of the host FPSIMD/SVE/SME state is applied/available in the KVM arm64 implementation (backport to stable trees as needed).

  5. Compensating control

    Avoid ptrace-related inconsistent host SVE state discard by applying the eager save+flush approach so host FPSIMD/SVE/SME state is not discarded after ptrace modification.

  6. Operational

    If you previously relied on lazy discarding/saving of host FPSIMD/SVE/SME state, validate vCPU loading behavior (in kvm_arch_vcpu_load_fp()) after applying the unconditionally save+flush change to ensure no stale TIF_SVE/CPACR_ELx.ZEN configuration remains.

Event History

Apr 8, 2025
CVE Published
via MITRE·08:18 AM
Data Sourced
via MITRE·08:18 AM
DescriptionSeverity
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-22013?

CVE-2025-22013 is considered a high severity vulnerability due to its potential impact on the integrity of the host's FPSIMD/SVE state.

2

What does CVE-2025-22013 affect?

CVE-2025-22013 affects the Linux kernel versions starting from 5.17.

3

How do I fix CVE-2025-22013?

To fix CVE-2025-22013, you should update your Linux kernel to the latest version where the vulnerability has been patched.

4

What are the risks of not addressing CVE-2025-22013?

Failing to address CVE-2025-22013 could lead to stability issues and potential data corruption affecting the host's FPSIMD/SVE state.

5

Is CVE-2025-22013 a remote vulnerability?

CVE-2025-22013 is not considered a remote vulnerability, as it requires local access to the affected system to exploit.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203