arm64/fpsimd: signal: Forbid non-streaming SVE payload on SME-only systems
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7dde62f0687c8856b6c0660066c7ee83a6a6f033 · < e060d9069b49fe55f38057dfe592068014652671| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
arm64/fpsimd: signal: Forbid non-streaming SVE payload on SME-only systems
When system_supports_sme() is true but system_supports_sve() is false, restoring a specifically crafted SVE signal context can result in the task erroneously having non-streaming SVE state. Subsequent attempts to manipulate the task's FPSIMD/SVE/SME state can result in a variety of problems, including fatal EL1 UNDEFs.
In such configurations, the kernel always creates an SVE signal context when delivering a signal, and this can only be in one of two states:
(1) SVE_SIG_FLAG_SM is set, and an SVE payload is present containing streaming mode SVE state. The recorded VL is the task's live streaming VL.
(2) SVE_SIG_FLAG_SM is clear, and an SVE payload is not present. The FPSIMD context contains the non-streaming mode FPSIMD state. The recorded VL is 0.
Currently restore_sve_fpsimd_context() correctly rejects cases where SVE_SIG_FLAG_SM is set and an SVE payload is not present, but fails to reject cases where SVE_SIG_FLAG_SM is clear and an SVE payload is present. Consequently, restore_sve_fpsimd_context() can place the task in a state where it has non-streaming SVE state even when this is not supported by HW.
For example, this can cause a later EL1 UNDEF when the kernel attempts to restore the task's ZCR_EL1 value:
From the CVE record · Linux
On arm64 systems that support SME but not SVE, the Linux kernel can accept a crafted SVE signal context containing unsupported non-streaming SVE state. A local task restoring that context can trigger a fatal kernel exception and panic; no separate user interaction is described.
Engineers running the Linux kernel on arm64 systems with SME support but no SVE support should check their kernel against the vendor advisory; affected versions are not specified.