CVE-2024-1394
Description
A memory leak flaw was found in Golang in the RSA encrypting/decrypting code, which might lead to a resource exhaustion vulnerability using attacker-controlled inputs. The memory leak happens in github.com/golang-fips/openssl/openssl/rsa.go#L113. The objects leaked are pkey and ctx. That function uses named return parameters to free pkey and ctx if there is an error initializing the context or setting the different properties. All return statements related to error cases follow the "return nil, nil, fail(...)" pattern, meaning that pkey and ctx will be nil inside the deferred function that should free them.
How to fix
- github.com/golang-fips/openssl/v22.0.1 or later
- github.com/microsoft/go-crypto-openssl0.2.9 or later
- github.com/microsoft/go-crypto-openssl/openssl0.2.9 or later
- access.redhat.com/errata/RHSA-2024:1462
- access.redhat.com/errata/RHSA-2024:1468
- access.redhat.com/errata/RHSA-2024:1472
- access.redhat.com/errata/RHSA-2024:1501
- access.redhat.com/errata/RHSA-2024:1502
- access.redhat.com/errata/RHSA-2024:1561
- access.redhat.com/errata/RHSA-2024:1563
- access.redhat.com/errata/RHSA-2024:1566
- access.redhat.com/errata/RHSA-2024:1567
- access.redhat.com/errata/RHSA-2024:1574
- access.redhat.com/errata/RHSA-2024:1640
- access.redhat.com/errata/RHSA-2024:1644
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| github.com/golang-fips/goGo | v ≤ 1.22.1 | — |
| github.com/golang-fips/openssl/v2Go | v < 2.0.1 | 2.0.1 |
| github.com/microsoft/go-crypto-opensslGo | v ≤ 0.2.8, v < 0.2.9 | 0.2.9 |
| github.com/microsoft/go-crypto-openssl/opensslGo | v < 0.2.9 | 0.2.9 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.