Memory Leak Affecting buildah package, versions <2:1.33.8-4.module+el8.10.0+22202+761b9a65


Severity

Recommended
0.0
high
0
10

Based on CentOS security rating.

Threat Intelligence

EPSS
0.07% (33rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Memory Leak vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CENTOS8-BUILDAH-6475268
  • published21 Mar 2024
  • disclosed20 Mar 2024

Introduced: 20 Mar 2024

CVE-2024-1394  (opens in a new tab)
CWE-401  (opens in a new tab)

How to fix?

Upgrade Centos:8 buildah to version 2:1.33.8-4.module+el8.10.0+22202+761b9a65 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream buildah package and not the buildah package as distributed by Centos. See How to fix? for Centos:8 relevant fixed versions and status.

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.

CVSS Scores

version 3.1