Descrizione
In the Linux kernel, the following vulnerability has been resolved: userfaultfd: gate must_wait writability check on pte_present() userfaultfd_must_wait() and userfaultfd_huge_must_wait() read the PTE without taking the page table lock and then apply pte_write() / huge_pte_write() to it. Those accessors decode bits from the present encoding only; on a swap or migration entry they read the offset bits that happen to share the same position and return an undefined result. The intent of the check is "is this fault still WP-blocked?". A non-marker swap entry means the page is in transit -- the userfault context the original fault delivered against is no longer the same, and the swap-in or migration completion path will re-deliver a fresh fault if userspace still needs to handle it. Worst case under the current code the garbage write bit says "wait", and the thread stays asleep until a UFFDIO_WAKE that may never arrive. Gate the writability check on pte_present() so the lockless re-check only inspects present-PTE bits when the entry is actually present. The non-present, non-marker case returns "don't wait" and lets the fault path retry.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.5.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
4.11precedenti alla5.10.261→ aggiornare alla5.10.261o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.11precedenti alla5.15.212→ aggiornare alla5.15.212o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.16precedenti alla6.1.178→ aggiornare alla6.1.178o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.145→ aggiornare alla6.6.145o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.96→ aggiornare alla6.12.96o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti 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/29e6f952c5fb7dc1d6b90fe5b7f…
- Patch: git.kernel.org/stable/c/5f4dbdb0a87596214076b20b94f…
- Patch: git.kernel.org/stable/c/60d696a037eeeedfb57756dfe7e…
- Patch: git.kernel.org/stable/c/710183888174639a15fcec16cd1…
- Patch: git.kernel.org/stable/c/8e80af52db652fbc41320eee45a…
- Patch: git.kernel.org/stable/c/a5700a4c1c9099ac2ac73fe8a09…
- Patch: git.kernel.org/stable/c/a6e9a4939e359599701b1da351e…
- Patch: git.kernel.org/stable/c/d4026417e8184d13850a0bad4d9…
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 | ≥ 4.11 < 5.10.261 | 5.10.261 |
| Linux | Linux Kernel | ≥ 5.11 < 5.15.212 | 5.15.212 |
| Linux | Linux Kernel | ≥ 5.16 < 6.1.178 | 6.1.178 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.145 | 6.6.145 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.96 | 6.12.96 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.39 | 6.18.39 |
| Linux | Linux Kernel | ≥ 6.19 < 7.1.4 | 7.1.4 |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/29e6f952c5fb7dc1d6b90fe5b7f36063d44ddae0
- Patchhttps://git.kernel.org/stable/c/5f4dbdb0a87596214076b20b94f2b71b522170b3
- Patchhttps://git.kernel.org/stable/c/60d696a037eeeedfb57756dfe7ec08a1587c8631
- Patchhttps://git.kernel.org/stable/c/710183888174639a15fcec16cd1af766b8480bb7
- Patchhttps://git.kernel.org/stable/c/8e80af52db652fbc41320eee45a4f73bc029faf2
- Patchhttps://git.kernel.org/stable/c/a5700a4c1c9099ac2ac73fe8a09cf059972e0d2f
- Patchhttps://git.kernel.org/stable/c/a6e9a4939e359599701b1da351e84f72e021443a
- Patchhttps://git.kernel.org/stable/c/d4026417e8184d13850a0bad4d96ceb6ed9f7152