Descrizione
In the Linux kernel, the following vulnerability has been resolved: ima: verify the previous kernel's IMA buffer lies in addressable RAM Patch series "Address page fault in ima_restore_measurement_list()", v3. When the second-stage kernel is booted via kexec with a limiting command line such as "mem=<size>" we observe a pafe fault that happens. BUG: unable to handle page fault for address: ffff97793ff47000 RIP: ima_restore_measurement_list+0xdc/0x45a #PF: error_code(0x0000) not-present page This happens on x86_64 only, as this is already fixed in aarch64 in commit: cbf9c4b9617b ("of: check previous kernel's ima-kexec-buffer against memory bounds") This patch (of 3): When the second-stage kernel is booted with a limiting command line (e.g. "mem=<size>"), the IMA measurement buffer handed over from the previous kernel may fall outside the addressable RAM of the new kernel. Accessing such a buffer can fault during early restore. Introduce a small generic helper, ima_validate_range(), which verifies that a physical [start, end] range for the previous-kernel IMA buffer lies within addressable memory: - On x86, use pfn_range_is_mapped(). - On OF based architectures, use page_is_ram().
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.5.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
6.0precedenti alla6.12.77→ aggiornare alla6.12.77o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.16→ aggiornare alla6.18.16o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla6.19.6→ aggiornare alla6.19.6o successiva.
Patch e advisory
- Patch: git.kernel.org/stable/c/10d1c75ed4382a8e79874379caa…
- Patch: git.kernel.org/stable/c/5366ec7d2f793ce703c403d7fd4…
- Patch: git.kernel.org/stable/c/9e1f51c1ad57cc76a0e8b5eb270…
- Patch: git.kernel.org/stable/c/f11d7d088f5ed54b31c6735854c…
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.0 < 6.12.77 | 6.12.77 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.16 | 6.18.16 |
| Linux | Linux Kernel | ≥ 6.19 < 6.19.6 | 6.19.6 |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/10d1c75ed4382a8e79874379caa2ead8952734f9
- Patchhttps://git.kernel.org/stable/c/5366ec7d2f793ce703c403d7fd4c25a3db365b9d
- Patchhttps://git.kernel.org/stable/c/9e1f51c1ad57cc76a0e8b5eb27038f8973fff4fa
- Patchhttps://git.kernel.org/stable/c/f11d7d088f5ed54b31c6735854c12845eb60eb4a
- Riferimentohttps://git.kernel.org/stable/c/43308106a1762b72f3b20a44b75b2df5cb25b77b
- Riferimentohttps://git.kernel.org/stable/c/5bfa1941ec40d5bed68f3e3f22ea13aff9c6d67a