CVE-2022-2526

Source
https://cve.org/CVERecord?id=CVE-2022-2526
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-2526.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-2526
Downstream
Related
Published
2022-09-09T00:00:00Z
Modified
2026-07-22T02:07:08.132965Z
Summary
[none]
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-416"
    ],
    "cna_assigner": "redhat",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/2xxx/CVE-2022-2526.json"
}
References

Affected packages

Git / github.com/systemd/systemd

Affected ranges

Type
GIT
Repo
https://github.com/systemd/systemd
Events
Database specific
{
    "cpe": "cpe:2.3:a:systemd_project:systemd:240:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "240"
        },
        {
            "last_affected": "240"
        }
    ],
    "source": [
        "CPE_STRING",
        "REFERENCES"
    ]
}
Type
GIT
Repo
https://github.com/systemd/systemd-stable
Events
Database specific
{
    "cpe": "cpe:2.3:a:systemd_project:systemd:240:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "240"
        },
        {
            "last_affected": "240"
        }
    ],
    "source": "CPE_STRING"
}

Affected versions

Other
240
systemd 240
v240

Database specific

vanir_signatures_modified
"2026-07-22T02:07:08Z"
vanir_signatures
[
    {
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "length": 4329.0,
            "function_hash": "208401693791038653337512553355040068330"
        },
        "signature_version": "v1",
        "source": "https://github.com/systemd/systemd/commit/d973d94dec349fb676fdd844f6fe2ada3538f27c",
        "id": "CVE-2022-2526-0518585b",
        "target": {
            "function": "on_stream_io",
            "file": "src/resolve/resolved-dns-stream.c"
        }
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "length": 358.0,
            "function_hash": "165753356205743956457529010201804762870"
        },
        "signature_version": "v1",
        "source": "https://github.com/systemd/systemd/commit/d973d94dec349fb676fdd844f6fe2ada3538f27c",
        "id": "CVE-2022-2526-3d277f7d",
        "target": {
            "function": "dns_stream_complete",
            "file": "src/resolve/resolved-dns-stream.c"
        }
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "24244502987640347669429748297519997487",
                "305861172124080797233263628752068476767",
                "201898119636995375130900012674839025850",
                "243976609872396757423323106453765157402",
                "25033070272748089651412234795692720617",
                "4749797598595707144303836668512376180",
                "102934075727237860555720616686638501394",
                "89242042041014859283960974229838224291"
            ]
        },
        "signature_version": "v1",
        "source": "https://github.com/systemd/systemd/commit/d973d94dec349fb676fdd844f6fe2ada3538f27c",
        "id": "CVE-2022-2526-7591cea9",
        "target": {
            "file": "src/resolve/resolved-dns-stream.c"
        }
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-2526.json"