Descrizione
libssh2 through 1.11.1, fixed in commit a13bb6c, contains a missing bounds check vulnerability that allows a malicious SSH server to trigger an arbitrary-length heap out-of-bounds read and a free of an uninitialized pointer via the publickey subsystem. In libssh2_publickey_list_fetch(), the version 1 response parser reads a server-controlled comment_len value and advances the parse pointer without verifying sufficient bytes remain in the buffer, causing the out-of-bounds read to leak heap pointers from adjacent allocations defeating ASLR, followed by heap allocator state corruption when the error cleanup path frees an uninitialized pointer from a non-zeroed realloc() region.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5.
Versioni da aggiornare
- Libssh2 Libssh2: vulnerabili le versioni fino alla
1.11.1inclusa → aggiornare a una release successiva alla1.11.1.
Patch e advisory
- Patch: github.com/libssh2/libssh2/commit/a13bb6c773f0d…
- Patch: github.com/libssh2/libssh2/pull/2202
- Patch: www.vulncheck.com/advisories/libssh2-heap-out-of-bound…
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 |
|---|---|---|---|
| Libssh2 | Libssh2 | ≤ 1.11.1 | — |
Riferimenti
- Patchhttps://github.com/libssh2/libssh2/commit/a13bb6c773f0d55ad1628cede57e99803cd898d9
- Patchhttps://github.com/libssh2/libssh2/pull/2202
- Patchhttps://www.vulncheck.com/advisories/libssh2-heap-out-of-bounds-read-via-publickey-subsystem
- Riferimentohttps://cert-portal.siemens.com/productcert/html/ssa-457936.html