cve.bz

CVE-2022-3821 Off-by-one Error

5.5 mediumExploit referenceEPSS 0.4%Fix available

Medium (5.5). EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 39th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-05-02. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-193 Off-by-one Error
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-3821 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-3821?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-3821?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-3821 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2022-3821

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2022-3821](https://cve.bz/cve/badge/CVE-2022-3821.svg)](https://cve.bz/cve/CVE-2022-3821)

HTML:

<a href="https://cve.bz/cve/CVE-2022-3821"><img src="https://cve.bz/cve/badge/CVE-2022-3821.svg" alt="CVE-2022-3821"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
systemd_project:systemdthrough 251
redhat:enterprise_linux8.0
redhat:enterprise_linux9.0
fedoraproject:fedora35

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10systemd241-7~deb10u10DLA-3474-1
Debian12, 13, 14systemd251.3-1DEBIAN-CVE-2022-3821
Ubuntu18.04:LTSsystemd237-3ubuntu10.57UBUNTU-CVE-2022-3821 USN-5928-1
Ubuntu20.04:LTSsystemd245.4-4ubuntu3.20UBUNTU-CVE-2022-3821 USN-5928-1
Ubuntu22.04:LTSsystemd249.11-0ubuntu3.7UBUNTU-CVE-2022-3821 USN-5928-1
UbuntuPro:14.04:LTSsystemd204-5ubuntu20.31+esm2UBUNTU-CVE-2022-3821 USN-5928-1
UbuntuPro:16.04:LTSsystemd229-4ubuntu21.31+esm3UBUNTU-CVE-2022-3821 USN-5928-1
Red Hatenterprise_linux:8::baseossystemd, systemd-pam, systemd-libs and 13 more0:239-68.el8_7.1RHSA-2023:0100
Red Hatenterprise_linux:9::appstreamsystemd-devel, systemd-debuginfo, systemd-debugsource and 11 more0:250-12.el9_1.1RHSA-2023:0336
Red Hatenterprise_linux:9::baseossystemd, systemd-pam, systemd-libs and 17 more0:250-12.el9_1.1RHSA-2023:0336
Red Hatrhel_eus:8.6::baseossystemd, systemd-pam, systemd-libs and 13 more0:239-58.el8_6.13RHSA-2024:1105
SUSELinux Enterprise Micro 5.1, Linux Enterprise Micro 5.2, Linux Enterprise Module for Basesystem 15 SP3systemd246.16-150300.7.54.1SUSE-SU-2022:4056-1
SUSELinux Enterprise Micro 5.3, Linux Enterprise Module for Basesystem 15 SP4systemd249.12-150400.8.13.1SUSE-SU-2022:3999-1
SUSELinux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP4-ESPOS, Linux Enterprise Server 12 SP4-LTSS and 3 moresystemd228-150.108.2SUSE-SU-2023:1776-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5systemd228-157.43.2SUSE-SU-2022:4279-1
SUSELinux Micro 6.0systemd254.18-1.1SUSE-SU-2025:20041-1
openSUSELeap 15.3, Leap 15.4, Leap Micro 5.2systemd246.16-150300.7.54.1SUSE-SU-2022:4056-1
openSUSELeap 15.4systemd249.12-150400.8.13.1SUSE-SU-2022:3999-1
openSUSETumbleweedsystemd254.5-3.1openSUSE-SU-2024:13366-1
AlmaLinux8systemd, systemd-pam, systemd-libs and 5 more239-68.el8_7.1ALSA-2023:0100
AlmaLinux9systemd, systemd-pam, systemd-libs and 7 more250-12.el9_1.1ALSA-2023:0336
Rocky Linux9systemd0:250-12.el9_1.1RLSA-2023:0336
Azure Linux2systemd250.3-10AZL-11443
Azure Linux3systemd-bootstrap250.3-17AZL-41659

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Network Manager uses systemd's format_timespan() only via the FORMAT_TIMESPAN() macro which allocates a 64-byte buffer on the stack.

The longest string representing 32bit values in seconds doesn't exceed 34 bytes (for example, "134y 10month 10w 1d 10h 10min 10s"). Since all the values are in exact seconds there is no decimal part to print.

Therefore, it doesn't seem possible to trigger the buffer overflow by returning a specially crafted DHCPv6 lease, and the CVE doesn't affect Network Manager.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8systemd-0:239-68.el8_7.1Fixed 2023-01-12RHSA-2023:0100
Red Hat Enterprise Linux 8.6 Extended Update Supportsystemd-0:239-58.el8_6.13Fixed 2024-03-05RHSA-2024:1105
Red Hat Enterprise Linux 9systemd-0:250-12.el9_1.1Fixed 2023-01-23RHSA-2023:0336
Red Hat Enterprise Linux 7NetworkManagerNot affected
Red Hat Enterprise Linux 7systemdOut of support scope
Red Hat Enterprise Linux 8NetworkManagerNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-3821.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-23-348-10Siemens SIMATIC S7-15002023-12-12Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON