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.

Testo originale del record CVE (in inglese).

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 alla 7.2.16 o successiva.
  • Valkey Valkey: vulnerabili le versioni dalla 8.0.0 precedenti alla 8.0.13 → aggiornare alla 8.0.13 o successiva.
  • Valkey Valkey: vulnerabili le versioni dalla 8.1.0 precedenti alla 8.1.12 → aggiornare alla 8.1.12 o successiva.
  • Valkey Valkey: vulnerabili le versioni dalla 9.0.0 precedenti alla 9.0.8 → aggiornare alla 9.0.8 o successiva.
  • Valkey Valkey: vulnerabili le versioni dalla 9.1.0 precedenti alla 9.1.4 → aggiornare alla 9.1.4 o successiva.
  • Valkey Valkey: vulnerabili le versioni dalla 9.2.0-rc1 precedenti alla 9.2.0 → aggiornare alla 9.2.0 o 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

  1. Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
  2. Confrontare la versione installata con quelle indicate sopra.
  3. Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
  4. Ripetere la scansione per confermare la correzione.

Configurazioni interessate

VendorProdottoVersioni vulnerabiliCorretta 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

Riferimenti