CVE Vulnerabilities

CVE-2022-2526

Use After Free

Published: Sep 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
RedHat/V2
RedHat/V3
9.8 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

A use-after-free vulnerability was found in systemd. This issue occurs due to the on_stream_io() function and dns_stream_complete() function in resolved-dns-stream.c not incrementing the reference counting for the DnsStream object. Therefore, other functions and callbacks called can dereference the DNSStream object, causing the use-after-free when the reference is still used later.

Weakness

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory “belongs” to the code that operates on the new pointer.

Affected Software

NameVendorStart VersionEnd Version
SystemdSystemd_project240 (including)240 (including)
Red Hat Enterprise Linux 7RedHatsystemd-0:219-78.el7_9.7*
Red Hat Enterprise Linux 8RedHatsystemd-0:239-58.el8_6.4*
Red Hat Enterprise Linux 8.1 Update Services for SAP SolutionsRedHatsystemd-0:239-18.el8_1.11*
Red Hat Enterprise Linux 8.2 Extended Update SupportRedHatsystemd-0:239-31.el8_2.9*
Red Hat Enterprise Linux 8.4 Extended Update SupportRedHatsystemd-0:239-45.el8_4.12*
Red Hat Virtualization 4 for Red Hat Enterprise Linux 8RedHatredhat-virtualization-host-0:4.5.2-202209140405_8.6*
SystemdUbuntubionic*
SystemdUbuntuesm-infra/bionic*
SystemdUbuntutrusty*
SystemdUbuntuupstream*
SystemdUbuntuxenial*

Potential Mitigations

References