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

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

Name Vendor Start Version End Version
Systemd Systemd_project 240 (including) 240 (including)
Red Hat Enterprise Linux 7 RedHat systemd-0:219-78.el7_9.7 *
Red Hat Enterprise Linux 8 RedHat systemd-0:239-58.el8_6.4 *
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions RedHat systemd-0:239-18.el8_1.11 *
Red Hat Enterprise Linux 8.2 Extended Update Support RedHat systemd-0:239-31.el8_2.9 *
Red Hat Enterprise Linux 8.4 Extended Update Support RedHat systemd-0:239-45.el8_4.12 *
Red Hat Virtualization 4 for Red Hat Enterprise Linux 8 RedHat redhat-virtualization-host-0:4.5.2-202209140405_8.6 *
Systemd Ubuntu bionic *
Systemd Ubuntu esm-infra/bionic *
Systemd Ubuntu trusty *
Systemd Ubuntu upstream *
Systemd Ubuntu xenial *

Potential Mitigations

References