CVE-2022-3821

Source
https://cve.org/CVERecord?id=CVE-2022-3821
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-3821.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-3821
Downstream
AZL (2)
CGA (10)
CLSA (6)
DEBIAN (1)
MGASA (1)
OESA (1)
openSUSE (1)
RHSA (3)
RLSA (1)
SUSE (5)
UBUNTU (1)
Related
Published
2022-11-08T00:00:00Z
Modified
2026-10-22T07:12:49Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

An off-by-one Error issue was discovered in Systemd in format_timespan() function of time-util.c. An attacker could supply specific values for time and accuracy that leads to buffer overrun in format_timespan(), leading to a Denial of Service.

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

Affected packages

Git / github.com/systemd/systemd

Affected ranges

Type
GIT
Repo
https://github.com/systemd/systemd
Events
Database specific
Show details
{
    "extracted_events":  [
        {
            "range":  [
                {
                    "introduced":  "Fixed in systemd v252-rc1"
                },
                {
                    "last_affected":  "Fixed in systemd v252-rc1"
                }
            ],
            "source":  "AFFECTED_FIELD",
            "strategy":  "StandaloneSingleVersion"
        },
        {
            "range":  [
                {
                    "fixed":  "9102c625a673a3246d7e73d8737f3494446bad4e"
                }
            ],
            "source":  "REFERENCES_COMMIT"
        }
    ]
}

Affected versions

Other
35
Fixed in systemd v252-rc1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-3821.json"
vanir_signatures
[
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "187197774867605728975572453615684576112",
                "200367803134423148290597242552267353202",
                "86350558284044936531423369741668952492",
                "279815649959355405795267225550957054386"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2022-3821-0c150019",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/systemd/systemd/commit/9102c625a673a3246d7e73d8737f3494446bad4e",
        "target":  {
            "file":  "src/test/test-time-util.c"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "318603724216709942588178449962184743803",
            "length":  96
        },
        "id":  "CVE-2022-3821-cb534d4d",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/systemd/systemd/commit/9102c625a673a3246d7e73d8737f3494446bad4e",
        "target":  {
            "file":  "src/test/test-time-util.c",
            "function":  "TEST"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "90962051446743331888006721636164292196",
            "length":  1651
        },
        "id":  "CVE-2022-3821-d412c7a9",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/systemd/systemd/commit/9102c625a673a3246d7e73d8737f3494446bad4e",
        "target":  {
            "file":  "src/basic/time-util.c",
            "function":  "format_timespan"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "140786591668832523190839408699687877415",
                "168438522841888037258673190060110437287",
                "161448172375777290203407143804467937883",
                "288618140824775369074077755147061431438"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2022-3821-d70d50ae",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/systemd/systemd/commit/9102c625a673a3246d7e73d8737f3494446bad4e",
        "target":  {
            "file":  "src/basic/time-util.c"
        }
    }
]
vanir_signatures_modified
"2026-10-22T07:12:49Z"