CVE Vulnerabilities

CVE-2022-28738

Double Free

Published: May 09, 2022 | Modified: Jan 24, 2024
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
7.5 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
7.7 MODERATE
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Ubuntu
MEDIUM

A double free was found in the Regexp compiler in Ruby 3.x before 3.0.4 and 3.1.x before 3.1.2. If a victim attempts to create a Regexp from untrusted user input, an attacker may be able to write to unexpected memory locations.

Weakness

The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.

Affected Software

Name Vendor Start Version End Version
Ruby Ruby-lang 3.0.0 (including) 3.0.4 (excluding)
Ruby Ruby-lang 3.1.0 (including) 3.1.2 (excluding)
Red Hat Enterprise Linux 8 RedHat ruby:3.0-8060020220810162001.ad008a3a *
Red Hat Enterprise Linux 9 RedHat ruby-0:3.0.4-160.el9_0 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-ruby30-ruby-0:3.0.4-149.el7 *
Ruby3.0 Ubuntu jammy *
Ruby3.0 Ubuntu upstream *

Potential Mitigations

References