Descrizione
In the Linux kernel, the following vulnerability has been resolved: udf: fix preallocation discarding before an empty allocation extent udf_discard_prealloc() finds the last extent of a file by peeking at the next one with udf_next_aext() and stopping when that returns 0. The peek reads into eloc and elen, and the code then uses them as the last extent. But when udf_next_aext() returns 0 they hold no defined value: if the extent list ends in a continuation descriptor that leads to an empty allocation extent, they describe that continuation, i.e. the block of the empty allocation extent, one block long. The kernel creates such lists itself: when udf_delete_aext() removes the only descriptor of the last allocation extent in a list, it leaves that allocation extent empty and the continuation to it in place. If the last extent is a preallocation, udf_discard_prealloc() deletes it with udf_delete_aext(), which finds the following allocation extent empty, so it also removes the continuation and frees that allocation extent's block. udf_discard_prealloc() then frees eloc and elen: that block a second time, instead of the preallocated blocks. On a space bitmap the preallocated blocks leak and the free block count drifts. On an unallocated space table the second free adds a second free extent for the same block, which is later handed out twice: fsx as run by generic/091 and generic/263 ends up with two parts of its test file in one block and reads back bad data. Peek into separate variables, so that eloc and elen keep the last extent that udf_next_aext() returned with 1.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: EPSS 0.2% (percentile 6).
Versioni da aggiornare
- Linux Linux: vulnerabili le versioni dalla
4.9.337precedenti alla4.10→ aggiornare alla4.10o successiva. - Linux Linux: vulnerabili le versioni dalla
4.14.303precedenti alla4.15→ aggiornare alla4.15o successiva. - Linux Linux: vulnerabili le versioni dalla
4.19.270precedenti alla4.20→ aggiornare alla4.20o successiva. - Linux Linux: vulnerabili le versioni dalla
5.4.229precedenti alla5.5→ aggiornare alla5.5o successiva. - Linux Linux: vulnerabili le versioni dalla
5.10.161precedenti alla5.11→ aggiornare alla5.11o successiva. - Linux Linux: vulnerabili le versioni dalla
5.15.85precedenti alla5.16→ aggiornare alla5.16o successiva. - Linux Linux: vulnerabili le versioni dalla
6.0.15precedenti alla6.1→ aggiornare alla6.1o successiva. - Linux Linux: vulnerabili le versioni dalla
6.1.1precedenti alla6.2→ aggiornare alla6.2o successiva. - Linux Linux: versione corretta
6.12.118(o successiva). - Linux Linux: versione corretta
6.18.64(o successiva). - Linux Linux: versione corretta
7.3.5(o successiva). - Linux Linux: versione corretta
7.4-rc2(o successiva). - Linux Linux: vulnerabile la versione
6.2→ installare l'ultima release supportata dal vendor.
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 | ≥ 4.9.337 < 4.10 | 4.10 |
| Linux | Linux | ≥ 4.14.303 < 4.15 | 4.15 |
| Linux | Linux | ≥ 4.19.270 < 4.20 | 4.20 |
| Linux | Linux | ≥ 5.4.229 < 5.5 | 5.5 |
| Linux | Linux | ≥ 5.10.161 < 5.11 | 5.11 |
| Linux | Linux | ≥ 5.15.85 < 5.16 | 5.16 |
| Linux | Linux | ≥ 6.0.15 < 6.1 | 6.1 |
| Linux | Linux | ≥ 6.1.1 < 6.2 | 6.2 |
| Linux | Linux | — | 6.12.118 |
| Linux | Linux | — | 6.18.64 |
| Linux | Linux | — | 7.3.5 |
| Linux | Linux | — | 7.4-rc2 |
| Linux | Linux | 6.2 | — |
Riferimenti
- Riferimentohttps://git.kernel.org/stable/c/0c52750caaaccee8b0e929450fe6538ec4985722
- Riferimentohttps://git.kernel.org/stable/c/0efa27a0d8b8f4b75eed80728d2c331c6104c308
- Riferimentohttps://git.kernel.org/stable/c/4ef0ffc5da8d2966d8f4bd0b6dc88a6fab2e891c
- Riferimentohttps://git.kernel.org/stable/c/f7d6f3fed104ca7e48a9ed081c2047300d3f96fc