The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-3821

CVE-2022-3821: Systemd Off-by-One DoS Vulnerability

CVE-2022-3821 is an off-by-one error in Systemd's format_timespan() function that allows attackers to trigger a buffer overrun, causing denial of service. This article covers technical details, affected versions, and mitigations.

Published: February 17, 2026

CVE-2022-3821 Overview

An off-by-one error vulnerability was discovered in systemd's format_timespan() function within the time-util.c source file. This boundary condition error allows a local attacker to supply specially crafted values for time and accuracy parameters, triggering a buffer overrun that leads to a Denial of Service condition.

Critical Impact

Local attackers can crash systemd services by exploiting the off-by-one error in time formatting functions, potentially disrupting critical system services on affected Linux distributions.

Affected Products

  • systemd_project systemd
  • Red Hat Enterprise Linux 8.0 and 9.0
  • Fedora 35

Discovery Timeline

  • 2022-11-08 - CVE CVE-2022-3821 published to NVD
  • 2025-05-02 - Last updated in NVD database

Technical Details for CVE-2022-3821

Vulnerability Analysis

The vulnerability exists in the format_timespan() function located in src/basic/time-util.c. This function is responsible for formatting time duration values into human-readable strings. The off-by-one error occurs during buffer boundary calculations, where the function miscalculates the available buffer space by one byte.

When an attacker provides specific combinations of time and accuracy values, the function writes one byte beyond the allocated buffer boundary. This out-of-bounds write corrupts adjacent memory, which can cause the affected systemd component to crash or behave unexpectedly.

The impact is limited to availability (Denial of Service) rather than confidentiality or integrity breaches. The attack requires local access and low privileges, making it exploitable by authenticated users on the system.

Root Cause

The root cause is a classic off-by-one boundary condition error (CWE-193) in the buffer size calculation within the format_timespan() function. The original code used MIN((size_t) k, l) when calculating the number of bytes to copy, where l represents the remaining buffer space. This failed to account for the null terminator, allowing the function to write past the buffer boundary by one byte under specific input conditions.

Attack Vector

This vulnerability requires local access to the system. An attacker with low privileges can exploit this flaw by:

  1. Crafting specific time and accuracy parameter values that trigger the boundary miscalculation
  2. Passing these values to systemd functions that utilize format_timespan()
  3. Causing the buffer overrun, which leads to service crashes or unexpected behavior

The attack does not require user interaction and affects the availability of the system by causing systemd-related processes to crash.

c
// Security patch from systemd commit 9102c625a673a3246d7e73d8737f3494446bad4e
                        t = b;
                }

-                n = MIN((size_t) k, l);
+                n = MIN((size_t) k, l-1);

                l -= n;
                p += n;

Source: GitHub Systemd Commit

Detection Methods for CVE-2022-3821

Indicators of Compromise

  • Unexpected crashes of systemd-related services or daemons
  • Segmentation faults or memory corruption errors in system logs related to systemd components
  • Abnormal patterns of service restarts involving time-related systemd functionality

Detection Strategies

  • Monitor system logs for segmentation faults or crashes in systemd processes using journalctl -u systemd*
  • Implement process crash monitoring for critical systemd services
  • Use memory sanitizers (AddressSanitizer) in development/testing environments to detect buffer overflows

Monitoring Recommendations

  • Enable systemd service watchdogs and monitor for unexpected service restarts
  • Configure alerting for systemd service failures using tools like systemctl status monitoring
  • Review dmesg and syslog for kernel-level memory violation messages associated with systemd processes

How to Mitigate CVE-2022-3821

Immediate Actions Required

  • Update systemd to the latest patched version available for your distribution
  • Apply security patches from Red Hat, Fedora, Debian, or Gentoo depending on your Linux distribution
  • Restrict local access to untrusted users until patches are applied

Patch Information

The vulnerability has been fixed in systemd through commit 9102c625a673a3246d7e73d8737f3494446bad4e. The fix changes the buffer calculation from MIN((size_t) k, l) to MIN((size_t) k, l-1), ensuring the null terminator is properly accounted for and preventing the buffer overrun.

Distribution-specific patches are available:

  • Red Hat: See Red Hat Bug Report 2139327
  • Fedora: Available via Fedora Package Announcement
  • Debian: See Debian LTS Announcement
  • Gentoo: Addressed in GLSA 202305-15

Workarounds

  • Limit local user access to reduce the attack surface until patches can be applied
  • Monitor systemd services for crashes and implement automatic restart policies
  • Implement process isolation for untrusted workloads to minimize potential impact
bash
# Check current systemd version
systemctl --version

# Update systemd on Red Hat/CentOS/Fedora
sudo dnf update systemd

# Update systemd on Debian/Ubuntu
sudo apt update && sudo apt upgrade systemd

# Verify patch application by checking version
rpm -q systemd  # For RHEL/Fedora
dpkg -l systemd # For Debian/Ubuntu

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechSystemd

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-193
  • Technical References
  • Red Hat Bug Report

  • GitHub Systemd Issue

  • Debian LTS Announcement

  • Fedora Package Announcement

  • Gentoo GLSA 202305-15
  • Vendor Resources
  • GitHub Systemd Commit

  • GitHub Systemd Pull Request
  • Related CVEs
  • CVE-2026-29111: systemd Denial of Service Vulnerability

  • CVE-2026-4105: systemd Privilege Escalation Vulnerability

  • CVE-2025-4598: Systemd Privilege Escalation Vulnerability

  • CVE-2020-13776: Systemd Privilege Escalation Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English