Use After Free Affecting openssl package, versions >=3.0.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (12th 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 Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-OPENSSL-7161588
  • published29 May 2024
  • disclosed28 May 2024
  • creditWilliam Ahern

Introduced: 28 May 2024

CVE-2024-4741  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

There is no fixed version for openssl.

Overview

openssl is a package that wraps the OpenSSL library.

Affected versions of this package are vulnerable to Use After Free via the SSL_free_buffers function. An attacker can execute arbitrary code, corrupt valid data or cause a crash by exploiting the freed memory area.

The SSL_free_buffers function is used to free the internal OpenSSL buffer used when processing an incoming record from the network. The call is only expected to succeed if the buffer is not currently in use. However, two scenarios have been identified where the buffer is freed even when still in use.

  1. The first scenario occurs where a record header has been received from the network and processed by OpenSSL, but the full record body has not yet arrived. In this case calling SSL_free_buffers will succeed even though a record has only been partially processed and the buffer is still in use.

  2. The second scenario occurs where a full record containing application data has been received and processed by OpenSSL but the application has only read part of this data. Again a call to SSL_free_buffers will succeed even though the buffer is still in use.

While these scenarios could occur accidentally during normal operation a malicious attacker could attempt to engineer a situation where this occurs.

Note:

The FIPS modules in 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.

CVSS Scores

version 3.1