{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-22013",
  "modified": "2026-10-07T17:22:01Z",
  "upstream": [
    "CVE-2025-22013"
  ],
  "published": "2025-04-08T08:16:52Z",
  "summary": "KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state\n\nThere are several problems with the way hyp code lazily saves the host's\nFPSIMD/SVE state, including:\n\n* Host SVE being discarded unexpectedly due to inconsistent\n  configuration of TIF_SVE and CPACR_ELx.ZEN. This has been seen to\n  result in QEMU crashes where SVE is used by memmove(), as reported by\n  Eric Auger:\n\n  https://issues.redhat.com/browse/RHEL-68997\n\n* Host SVE state is discarded *after* modification by ptrace, which was an\n  unintentional ptrace ABI change introduced with lazy discarding of SVE state.\n\n* The host FPMR value can be discarded when running a non-protected VM,\n  where FPMR support is not exposed to a VM, and that VM uses\n  FPSIMD/SVE. In these cases the hyp code does not save the host's FPMR\n  before unbinding the host's FPSIMD/SVE/SME state, leaving a stale\n  value in memory.\n\nAvoid these by eagerly saving and \"flushing\" the host's FPSIMD/SVE/SME\nstate when loading a vCPU such that KVM does not need to save any of the\nhost's FPSIMD/SVE/SME state. For clarity, fpsimd_kvm_prepare() is\nremoved and the necessary call to fpsimd_save_and_flush_cpu_state() is\nplaced in kvm_arch_vcpu_load_fp(). As 'fpsimd_state' and 'fpmr_ptr'\nshould not be used, they are set to NULL; all uses of these will be\nremoved in subsequent patches.\n\nHistorical problems go back at least as far as v5.17, e.g. erroneous\nassumptions about TIF_SVE being clear in commit:\n\n  8383741ab2e773a9 (\"KVM: arm64: Get rid of host SVE tracking/saving\")\n\n... and so this eager save+flush probably needs to be backported to ALL\nstable trees.",
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.6.20-1+rpt1",
        "1:6.6.28-1+rpt1",
        "1:6.6.31-1+rpt1",
        "1:6.6.47-1+rpt1",
        "1:6.6.51-1+rpt1",
        "1:6.6.51-1+rpt2",
        "1:6.6.51-1+rpt3",
        "1:6.6.62-1+rpt1",
        "1:6.6.74-1+rpt1",
        "1:6.12.20-1+rpt1~bpo12+1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-2712",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v8",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-2712",
            "binary_version": "1:6.6.28-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-v8",
            "binary_version": "1:6.6.28-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.31+rpt-rpi-2712",
            "binary_version": "1:6.6.31-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.31+rpt-rpi-v8",
            "binary_version": "1:6.6.31-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-2712",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v8",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-2712",
            "binary_version": "1:6.6.51-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v8",
            "binary_version": "1:6.6.51-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-2712",
            "binary_version": "1:6.6.51-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v8",
            "binary_version": "1:6.6.51-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-2712",
            "binary_version": "1:6.6.51-1+rpt3"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v8",
            "binary_version": "1:6.6.51-1+rpt3"
          },
          {
            "binary_name": "linux-image-6.6.62+rpt-rpi-2712",
            "binary_version": "1:6.6.62-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.62+rpt-rpi-v8",
            "binary_version": "1:6.6.62-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.74+rpt-rpi-2712",
            "binary_version": "1:6.6.74-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.74+rpt-rpi-v8",
            "binary_version": "1:6.6.74-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.12.20+rpt-rpi-2712",
            "binary_version": "1:6.12.20-1+rpt1~bpo12+1"
          },
          {
            "binary_name": "linux-image-6.12.20+rpt-rpi-v8",
            "binary_version": "1:6.12.20-1+rpt1~bpo12+1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.6.20-1+rpt1": {
            "linux_commit": "6f16847710cc0502450788b9f12f0a14d3429668",
            "upstream_version": "6.6.20",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.6.28-1+rpt1": {
            "linux_commit": "0c341f47adc3578cd5f817aa20ee2b7f9ae6b23e",
            "upstream_version": "6.6.28",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.6.31-1+rpt1": {
            "linux_commit": "c1432b4bae5b6582f4d32ba381459f33c34d1424",
            "upstream_version": "6.6.31",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.6.47-1+rpt1": {
            "linux_commit": "cf64a1dfecc2dc418efdd61701c1a4b185ab4761",
            "upstream_version": "6.6.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.6.51-1+rpt1": {
            "linux_commit": "0094eba3f2a4338cfa6854b0b5104d02ba0fa01f",
            "upstream_version": "6.6.51",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.6.51-1+rpt2": {
            "linux_commit": "82a50e430ef1d6eb37d78e25aa572c1f6ea56160",
            "upstream_version": "6.6.51",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.6.51-1+rpt3": {
            "linux_commit": "5aeecea9f4a45248bcf564dec924965e066a7bfd",
            "upstream_version": "6.6.51",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.6.62-1+rpt1": {
            "linux_commit": "dd2394360860d15146c96635796a75b05bb32b61",
            "upstream_version": "6.6.62",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.6.74-1+rpt1": {
            "linux_commit": "a18d9ced4965462cb7b3b4252ada440395105308",
            "upstream_version": "6.6.74",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.85"
          },
          "1:6.12.20-1+rpt1~bpo12+1": {
            "linux_commit": "cd231d4775b14f228606c09f219b48308f6ab3aa",
            "upstream_version": "6.12.20",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.12.21"
          }
        }
      }
    },
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:13",
        "name": "linux"
      },
      "versions": [
        "1:6.12.19-1+rpt1~bpo12+1",
        "1:6.12.19-1+rpt1",
        "1:6.12.20-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.12.19+rpt-rpi-2712",
            "binary_version": "1:6.12.19-1+rpt1~bpo12+1"
          },
          {
            "binary_name": "linux-image-6.12.19+rpt-rpi-v8",
            "binary_version": "1:6.12.19-1+rpt1~bpo12+1"
          },
          {
            "binary_name": "linux-image-6.12.19+rpt-rpi-2712",
            "binary_version": "1:6.12.19-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.12.19+rpt-rpi-v8",
            "binary_version": "1:6.12.19-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.12.20+rpt-rpi-2712",
            "binary_version": "1:6.12.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.12.20+rpt-rpi-v8",
            "binary_version": "1:6.12.20-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.12.19-1+rpt1~bpo12+1": {
            "linux_commit": "121c2c384b9c2f4790ffb31b2cd25c7d75c8fda0",
            "upstream_version": "6.12.19",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.12.21"
          },
          "1:6.12.19-1+rpt1": {
            "linux_commit": "121c2c384b9c2f4790ffb31b2cd25c7d75c8fda0",
            "upstream_version": "6.12.19",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.12.21"
          },
          "1:6.12.20-1+rpt1": {
            "linux_commit": "cd231d4775b14f228606c09f219b48308f6ab3aa",
            "upstream_version": "6.12.20",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.12.21"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-22013"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5289ac43b69c61a49c75720921f2008005a31c43"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/04c50cc23a492c4d43fdaefc7c1ecc0ff6f7b82e"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/806d5c1e1d2e5502175a24bf70f251648d99c36a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/79e140bba70bcacc5fe15bf8c0b958793fd7d56f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/900b444be493b7f404898c785d6605b177a093d0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/fbc7e61195e23f744814e78524b73b59faa54ab4"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T12:19:11Z"
  }
}
