CVE-2022-2526
NixOS vulnerability analysis and mitigation

Overview

A use-after-free vulnerability (CVE-2022-2526) was discovered in systemd, specifically affecting the onstreamio() function and dnsstreamcomplete() function in 'resolved-dns-stream.c'. The vulnerability was disclosed in August 2022 and affects systemd versions prior to 240. The issue stems from these functions not incrementing the reference counting for the DnsStream object correctly (Ubuntu, NVD).

Technical details

The vulnerability occurs when the onstreamio() function and dnsstreamcomplete() function in 'resolved-dns-stream.c' fail to increment the reference counting for the DnsStream object. This allows other functions and callbacks to dereference the DNSStream object, leading to a use-after-free condition when the reference is still used later. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 (Critical) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (Rapid7).

Impact

Successful exploitation of this vulnerability could lead to disclosure of sensitive information, addition or modification of data, or Denial of Service (DoS). The high severity score indicates potential for complete compromise of system confidentiality, integrity, and availability (NetApp).

Mitigation and workarounds

The vulnerability has been fixed in the systemd codebase through a patch that explicitly pins the stream while calling callbacks for it. The fix involves adding reference protection to the stream during processing by using dnsstreamref() (GitHub). Various Linux distributions have released security updates to address this vulnerability (RedHat).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management