Skip to main content

CVE-2022-3821: CWE-193 - Off-by-one Error in systemd

Medium
VulnerabilityCVE-2022-3821cvecve-2022-3821cwe-193
Published: Tue Nov 08 2022 (11/08/2022, 00:00:00 UTC)
Source: CVE
Vendor/Project: n/a
Product: systemd

Description

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.

AI-Powered Analysis

AILast updated: 06/26/2025, 02:31:29 UTC

Technical Analysis

CVE-2022-3821 is a medium-severity vulnerability identified in the systemd software, specifically within the format_timespan() function located in the time-util.c source file. The root cause is an off-by-one error (CWE-193), a common programming mistake where a buffer boundary is incorrectly handled, leading to a buffer overrun condition. In this case, an attacker can supply crafted values for the parameters 'time' and 'accuracy' to the format_timespan() function, triggering a buffer overflow. This overflow can cause a Denial of Service (DoS) by crashing the systemd service or potentially destabilizing the host system. The vulnerability requires local privileges (AV:L) and low attack complexity (AC:L), with the attacker needing at least low privileges (PR:L) but no user interaction (UI:N). The scope of impact is unchanged (S:U), and the vulnerability affects the availability (A:H) of the system, but does not impact confidentiality or integrity. The flaw was fixed in systemd version 252-rc1. No known exploits have been reported in the wild to date. Systemd is a critical init system and service manager used widely across Linux distributions, including many servers and enterprise environments. Because systemd runs with elevated privileges and manages core system services, a DoS attack exploiting this vulnerability could disrupt critical operations and services on affected hosts.

Potential Impact

For European organizations, the impact of CVE-2022-3821 primarily manifests as potential service outages or system instability on Linux-based infrastructure using vulnerable systemd versions prior to v252-rc1. This can affect servers, cloud instances, and embedded devices relying on systemd for service management. Disruption of systemd can lead to cascading failures in dependent services, impacting business continuity, especially in sectors with high availability requirements such as finance, telecommunications, healthcare, and critical infrastructure. Although the vulnerability does not allow privilege escalation or data compromise, the resulting Denial of Service could cause operational downtime, loss of productivity, and potential regulatory compliance issues related to service availability. Given the local attack vector, insider threats or compromised user accounts could exploit this vulnerability. Additionally, automated scripts or malware with local access could trigger the flaw to disrupt systems. Organizations relying heavily on Linux servers should consider the risk of service interruptions and plan accordingly.

Mitigation Recommendations

To mitigate CVE-2022-3821, European organizations should: 1) Prioritize upgrading systemd to version 252-rc1 or later where the vulnerability is patched. This is the most effective and direct mitigation. 2) Implement strict access controls and monitoring to limit local user privileges, reducing the risk of exploitation by low-privilege users. 3) Employ host-based intrusion detection systems (HIDS) to detect anomalous behavior or crashes related to systemd. 4) Harden Linux systems by minimizing the number of users with local access and enforcing the principle of least privilege. 5) For environments where immediate patching is not feasible, consider isolating critical systems or using containerization to limit the blast radius of potential DoS attacks. 6) Regularly audit and monitor system logs for unusual systemd failures or restarts that could indicate attempted exploitation. 7) Incorporate this vulnerability into incident response playbooks to ensure rapid detection and remediation if exploitation is suspected. These steps go beyond generic advice by focusing on access control, monitoring, and operational readiness specific to systemd and local attack vectors.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
redhat
Date Reserved
2022-11-02T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9838c4522896dcbebd74

Added to database: 5/21/2025, 9:09:12 AM

Last enriched: 6/26/2025, 2:31:29 AM

Last updated: 8/16/2025, 2:16:03 PM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats