Vulnerabilities / CVE-2022-2526

critical

CVE-2022-2526

systemd-resolved: use-after-free when dealing with DnsStream in resolved-dns-stream.c

Published Modified CWE 416
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, Photon OS. Rated lower by Red Hat (high), AlmaLinux (high), Amazon (high), Oracle (high), Ubuntu (medium).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
Photon OS 3.0systemd239-44.ph3
alma 8systemd, systemd-container, systemd-devel and 5 more239-58.el8_6.4
amazon linux 2libgudev1, libgudev1-devel, systemd and 8 more219-78.amzn2.0.20
debian 11systemd240-1
debian 12systemd240-1
debian 13systemd240-1
debian 14systemd240-1
echosystemd240-1
Oracle Linux 7libgudev1, libgudev1-devel, systemd and 7 more219-78.0.9.el7_9.7
Oracle Linux 8systemd, systemd-container, systemd-devel and 5 more239-58.0.1.el8_6.4
rocky 8systemd, systemd-container, systemd-devel and 5 more239-58.el8_6.4
root.io debian 12rootio-systemd240-1
Show all 55 entries from 15 sources
SourcePackageFixed in
Photon OS 3.0systemd239-44.ph3
alma 8systemd239-58.el8_6.4
alma 8systemd-container239-58.el8_6.4
alma 8systemd-devel239-58.el8_6.4
alma 8systemd-journal-remote239-58.el8_6.4
alma 8systemd-libs239-58.el8_6.4
alma 8systemd-pam239-58.el8_6.4
alma 8systemd-tests239-58.el8_6.4
alma 8systemd-udev239-58.el8_6.4
amazon linux 2libgudev1219-78.amzn2.0.20
amazon linux 2libgudev1-devel219-78.amzn2.0.20
amazon linux 2systemd219-78.amzn2.0.20
amazon linux 2systemd-debuginfo219-78.amzn2.0.20
amazon linux 2systemd-devel219-78.amzn2.0.20
amazon linux 2systemd-journal-gateway219-78.amzn2.0.20
amazon linux 2systemd-libs219-78.amzn2.0.20
amazon linux 2systemd-networkd219-78.amzn2.0.20
amazon linux 2systemd-python219-78.amzn2.0.20
amazon linux 2systemd-resolved219-78.amzn2.0.20
amazon linux 2systemd-sysv219-78.amzn2.0.20
debian 11systemd240-1
debian 12systemd240-1
debian 13systemd240-1
debian 14systemd240-1
echosystemd240-1
Oracle Linux 7libgudev1219-78.0.9.el7_9.7
Oracle Linux 7libgudev1-devel219-78.0.9.el7_9.7
Oracle Linux 7systemd219-78.0.9.el7_9.7
Oracle Linux 7systemd-devel219-78.0.9.el7_9.7
Oracle Linux 7systemd-journal-gateway219-78.0.9.el7_9.7
Oracle Linux 7systemd-libs219-78.0.9.el7_9.7
Oracle Linux 7systemd-networkd219-78.0.9.el7_9.7
Oracle Linux 7systemd-python219-78.0.9.el7_9.7
Oracle Linux 7systemd-resolved219-78.0.9.el7_9.7
Oracle Linux 7systemd-sysv219-78.0.9.el7_9.7
Oracle Linux 8systemd239-58.0.1.el8_6.4
Oracle Linux 8systemd-container239-58.0.1.el8_6.4
Oracle Linux 8systemd-devel239-58.0.1.el8_6.4
Oracle Linux 8systemd-journal-remote239-58.0.1.el8_6.4
Oracle Linux 8systemd-libs239-58.0.1.el8_6.4
Oracle Linux 8systemd-pam239-58.0.1.el8_6.4
Oracle Linux 8systemd-tests239-58.0.1.el8_6.4
Oracle Linux 8systemd-udev239-58.0.1.el8_6.4
rocky 8systemd239-58.el8_6.4
rocky 8systemd-container239-58.el8_6.4
rocky 8systemd-devel239-58.el8_6.4
rocky 8systemd-journal-remote239-58.el8_6.4
rocky 8systemd-libs239-58.el8_6.4
rocky 8systemd-pam239-58.el8_6.4
rocky 8systemd-tests239-58.el8_6.4
rocky 8systemd-udev239-58.el8_6.4
root.io debian 12rootio-systemd240-1
root.io debian 13rootio-systemd240-1
ubuntu 18.04systemd237-3ubuntu10.54
ubuntu 18.04-ESMsystemd237-3ubuntu10.54

References

All 13 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.