CVE-2024-1394

High

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.

SeverityHigh
CVSS7.5
Exploit probability—
ProductGithub.com/golang-fips/go
PublishedMar 21, 2024
First seenMar 21, 2024
Weakness typeCWE-401CWE-401

How to fix

Affected products

ProductAffected versionsFixed in
github.com/golang-fips/goGov ≤ 1.22.1—
github.com/golang-fips/openssl/v2Gov < 2.0.12.0.1
github.com/microsoft/go-crypto-opensslGov ≤ 0.2.8, v < 0.2.90.2.9
github.com/microsoft/go-crypto-openssl/opensslGov < 0.2.90.2.9

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.