CVE-2022-2526: Use After Free

Published Jul 22, 2022
·
Updated

A use-after-free vulnerability was found in systemd. This issue occurs due to the onstreamio() function and dnsstreamcomplete() 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.

Other sources

systemd could allow a remote attacker to execute arbitrary code on the system, caused by a use-after-free flaw due to the onstreamio() function and dnsstreamcomplete() function in "resolved-dns-stream.c" not incrementing the reference counting for the DnsStream object. By sending a specially-crafted request, an attacker could exploit this vulnerability to execute arbitrary code or cause a denial of service condition on the system.

IBM

systemd-resolved is susceptible to a Use After Free (UAF) vulnerability in how DNS packets are handled. Functions such as onstreamio and dnsstreamcomplete in resolved-dns-stream.c do not increment the reference counting for the DnsStream object they are working on. Other functions and callbacks called there (e.g. onllmnrstreampacket) could unreference the DnsStream object, causing a Use After Free when the reference is still used later.

Upstream patch: https://github.com/systemd/systemd/commit/d973d94dec349fb676fdd844f6fe2ada3538f27c

Red Hat

Affected Software

19 affected componentsFixes available
redhat/systemd<0:219-78.el7_9.7
0:219-78.el7_9.7
redhat/systemd<0:239-58.el8_6.4
0:239-58.el8_6.4
redhat/systemd<0:239-18.el8_1.11
0:239-18.el8_1.11
redhat/systemd<0:239-31.el8_2.9
0:239-31.el8_2.9
redhat/systemd<0:239-45.el8_4.12
0:239-45.el8_4.12
redhat/systemd<240
240
IBM BM Security Guardium<=11.3
IBM Security Guardium<=11.4
IBM Security Guardium<=11.5
Systemd Project Systemd=240
NetApp Active Iq Unified Manager Vmware Vsphere
NetApp H300s Firmware
NetApp H300s
NetApp H500s Firmware
NetApp H500s
NetApp H700s Firmware
NetApp H700s
NetApp H410s Firmware
NetApp H410s

Event History

Jul 22, 2022
Data Sourced
via Red Hat·01:31 PM
DescriptionSeverityAffected Software
Aug 19, 2022
CVE Published
12:00 AM
Sep 9, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2022-2526?

The severity of CVE-2022-2526 is critical.

2

How does CVE-2022-2526 occur?

CVE-2022-2526 occurs due to a use-after-free vulnerability in systemd.

3

Which functions in systemd are affected by CVE-2022-2526?

The on_stream_io() function and dns_stream_complete() function in 'resolved-dns-stream.c' are affected by CVE-2022-2526.

4

Which versions of systemd are affected by CVE-2022-2526?

The versions affected by CVE-2022-2526 include systemd 240, 0:219-78.el7_9.7, 0:239-58.el8_6.4, 0:239-18.el8_1, 0:239-31.el8_2, and 0:239-45.el8_4.12.

5

How can I fix CVE-2022-2526?

To fix CVE-2022-2526, you need to update systemd to version 240 or apply the appropriate remedy provided by the package distributor.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203