CVE Vulnerabilities

CVE-2022-28738

Double Free

Published: May 09, 2022 | Modified: Nov 21, 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
root.io logo minimus.io logo echo.ai logo

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.

Affected Software

NameVendorStart VersionEnd Version
RubyRuby-lang3.0.0 (including)3.0.4 (excluding)
RubyRuby-lang3.1.0 (including)3.1.2 (excluding)
Red Hat Enterprise Linux 8RedHatruby:3.0-8060020220810162001.ad008a3a*
Red Hat Enterprise Linux 9RedHatruby-0:3.0.4-160.el9_0*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatrh-ruby30-ruby-0:3.0.4-149.el7*
Ruby3.0Ubuntujammy*
Ruby3.0Ubuntuupstream*

Potential Mitigations

References