Descrizione
In Valkey before 7.2.16, 8.0.x before 8.0.13, 8.1.x before 8.1.12, 9.0.x before 9.0.8, 9.1.x before 9.1.4 and 9.2.0 release candidates, when client eviction is enabled (maxmemory-clients is not 0), an authenticated user who can write to a key that other clients are blocked on (for example with BLPOP, BLMPOP, BZPOPMIN or XREAD BLOCK) can trigger a use-after-free. While the clients blocked on that key are served, evictClients() can select and free the client whose command made the key ready, although that command is still executing, and the server then keeps using the freed client. The blocked clients do not have to belong to the attacker. The result is a reliable crash of the server process. Servers with the default maxmemory-clients 0 are not affected.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5, EPSS 0.8% (percentile 52).
Versioni da aggiornare
- Valkey Valkey: vulnerabili le versioni precedenti alla
7.2.16→ aggiornare alla7.2.16o successiva. - Valkey Valkey: vulnerabili le versioni dalla
8.0.0precedenti alla8.0.13→ aggiornare alla8.0.13o successiva. - Valkey Valkey: vulnerabili le versioni dalla
8.1.0precedenti alla8.1.12→ aggiornare alla8.1.12o successiva. - Valkey Valkey: vulnerabili le versioni dalla
9.0.0precedenti alla9.0.8→ aggiornare alla9.0.8o successiva. - Valkey Valkey: vulnerabili le versioni dalla
9.1.0precedenti alla9.1.4→ aggiornare alla9.1.4o successiva. - Valkey Valkey: vulnerabili le versioni dalla
9.2.0-rc1precedenti alla9.2.0→ aggiornare alla9.2.0o successiva.
Indicazioni del vendor
Soluzione (testo originale del vendor):
Upgrade to Valkey 7.2.16, 8.0.13, 8.1.12, 9.0.8, 9.1.4, 9.2.0 or later.
Workaround (testo originale del vendor):
Set maxmemory-clients to 0, which disables client eviction; if you do, make sure client-output-buffer-limit and maxmemory still bound client memory. If client eviction is required, use Valkey ACLs so that untrusted users cannot write to keys that other clients block on, and cannot run the blocking commands (BLPOP, BRPOP, BLMOVE, BRPOPLPUSH, BLMPOP, BZPOPMIN, BZPOPMAX, BZMPOP, and XREAD or XREADGROUP with BLOCK).
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre la superficie esposta (disattivare servizi e funzionalità inutilizzati), mantenere attive le protezioni del sistema operativo (ASLR, DEP/NX) e segmentare la rete.
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 |
|---|---|---|---|
| Valkey | Valkey | < 7.2.16 | 7.2.16 |
| Valkey | Valkey | ≥ 8.0.0 < 8.0.13 | 8.0.13 |
| Valkey | Valkey | ≥ 8.1.0 < 8.1.12 | 8.1.12 |
| Valkey | Valkey | ≥ 9.0.0 < 9.0.8 | 9.0.8 |
| Valkey | Valkey | ≥ 9.1.0 < 9.1.4 | 9.1.4 |
| Valkey | Valkey | ≥ 9.2.0-rc1 < 9.2.0 | 9.2.0 |