Descrizione
In `github.com/eclipse-keypont/crypto11/v2` versions `<= 2.0.0-rc8` (and the deprecated v1 module paths `github.com/eclipse-keypont/crypto11 <= 1.6.8`, `github.com/ThalesGroup/crypto11 <= 1.7.0-rc1` and `github.com/ThalesIgnite/crypto11 <= 1.2.5`), the `cipher.AEAD` returned by `SecretKey.NewGCM()` passes whatever nonce it is given straight to `CK_GCM_PARAMS` without checking its length against `NonceSize()`, and accepts an empty nonce. On a token that accepts a zero-length GCM IV — SoftHSM2 does — every `Seal` with an empty nonce encrypts under the same IV, reusing the keystream and exposing the GHASH authentication key, which allows forgeries. Separately, `Config.UseGCMIVFromHSM` sends a NULL IV with length zero to the token unless `GCMIVFromHSMControl.SupplyIvForHSMGCMEncrypt` is also set, so the token has nowhere to write the IV it generates: a `Seal` with a non-empty nonce panics after the plaintext has already been encrypted, and a `Seal` with an empty nonce returns ciphertext under an empty IV without error. On the v1 line HSM-IV mode additionally never copies the token-generated IV back to the caller, so the caller keeps its own nonce while the data was encrypted under another one.
Come correggere
Priorità: Alta — pianificare la correzione entro pochi giorni. Motivazione: CVSS 9.1, EPSS 0.8% (percentile 58).
Versioni da aggiornare
- Eclipse Foundation github.com/eclipse-keypont/crypto11/v2: versione corretta
2.0.0-rc9(o successiva). - Eclipse Foundation github.com/eclipse-keypont/crypto11/v2: vulnerabili le versioni fino alla
2.0.0-rc8inclusa → aggiornare a una release successiva alla2.0.0-rc8. - Eclipse Foundation github.com/eclipse-keypont/crypto11: vulnerabili le versioni fino alla
1.6.8inclusa → aggiornare a una release successiva alla1.6.8. - Eclipse Foundation github.com/ThalesGroup/crypto11: vulnerabili le versioni fino alla
1.7.0-rc1inclusa → aggiornare a una release successiva alla1.7.0-rc1. - Eclipse Foundation github.com/ThalesIgnite/crypto11: vulnerabili le versioni fino alla
1.2.5inclusa → aggiornare a una release successiva alla1.2.5.
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 |
|---|---|---|---|
| Eclipse Foundation | github.com/eclipse-keypont/crypto11/v2 | — | 2.0.0-rc9 |
| Eclipse Foundation | github.com/eclipse-keypont/crypto11/v2 | ≤ 2.0.0-rc8 | — |
| Eclipse Foundation | github.com/eclipse-keypont/crypto11 | ≤ 1.6.8 | — |
| Eclipse Foundation | github.com/ThalesGroup/crypto11 | ≤ 1.7.0-rc1 | — |
| Eclipse Foundation | github.com/ThalesIgnite/crypto11 | ≤ 1.2.5 | — |
Riferimenti
- Riferimentohttps://github.com/eclipse-keypont/crypto11/commit/8d99b73c721c173ad85c0ca4e063c3da360a611d
- Riferimentohttps://github.com/eclipse-keypont/crypto11/security/advisories/GHSA-c2cp-4qw8-q4jg
- Riferimentohttps://gitlab.eclipse.org/security/cve-assignment/-/work_items/491
- Riferimentohttps://github.com/eclipse-keypont/crypto11/security/advisories/GHSA-c2cp-4qw8-q4jg