Descrizione
In the Linux kernel, the following vulnerability has been resolved: crypto: ccp - Do not initialize SNP for SEV ioctls Sashiko notes: > if SEV initialization fails and KVM is actively running normal VMs, could a > userspace process trigger this code path via /dev/sev ioctls (e.g., > SEV_PDH_GEN) and zero out MSR_VM_HSAVE_PA globally? Would the next VMRUN > execution for an active VM trigger a general protection fault and crash the > host? sev_move_to_init_state() is called for ioctls requiring only SEV firmware: SEV_PEK_GEN, SEV_PDH_GEN, SEV_PEK_CSR, SEV_PEK_CERT_IMPORT, and SEV_PDH_CERT_EXPORT. After the firmware command, it does SEV_SHUTDOWN on the SEV firmware. Since these commands do not require SNP to be initialized, skip it by calling __sev_platform_init_locked() which only initializes the SEV firmware. This way SNP is not Initialized at all, and HSAVE_PA is not cleared. The previous code saved any SEV initialization firmware error to init_args.error and then threw it away and hardcoded the return value of INVALID_PLATFORM_STATE regardless of the real firmware error. This patch changes it to surface the underlying error, which is hopefully both more useful and doesn't cause any problems. Note that it is still safe to call __sev_firmware_shutdown() directly: it calls __sev_snp_shutdown_locked(), which skips SNP shutdown if SNP was not initialized.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.5.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
6.12.75precedenti alla6.12.96→ aggiornare alla6.12.96o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.16precedenti alla6.18.39→ aggiornare alla6.18.39o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla7.1.4→ aggiornare alla7.1.4o successiva.
Patch e advisory
- Patch: git.kernel.org/stable/c/5181e88da99c3d1d41e25db3472…
- Patch: git.kernel.org/stable/c/9e983d0a74a6a2348e4ce61647e…
- Patch: git.kernel.org/stable/c/d51207735e7c224cf591fa260c5…
- Patch: git.kernel.org/stable/c/fb1758e74b8061aacfbce7bbb7a…
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| Linux | Linux Kernel | ≥ 6.12.75 < 6.12.96 | 6.12.96 |
| Linux | Linux Kernel | ≥ 6.16 < 6.18.39 | 6.18.39 |
| Linux | Linux Kernel | ≥ 6.19 < 7.1.4 | 7.1.4 |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/5181e88da99c3d1d41e25db3472a62b8d4b42cdd
- Patchhttps://git.kernel.org/stable/c/9e983d0a74a6a2348e4ce61647ec8a4dfbe198ac
- Patchhttps://git.kernel.org/stable/c/d51207735e7c224cf591fa260c557a451a69a5cf
- Patchhttps://git.kernel.org/stable/c/fb1758e74b8061aacfbce7bbb7a7cc650537e167