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

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 ID SNYK-RUBY-OPENSSL-7161588
  • published 29 May 2024
  • disclosed 28 May 2024
  • credit William Ahern

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
Expand this section

Snyk

Recommended
5.6 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    Low
  • Availability (A)
    Low
Expand this section

Red Hat

5.6 medium
Expand this section

SUSE

8.1 high