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
    • 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-2024-53142

CVE-2024-53142: Linux Kernel Buffer Overflow Vulnerability

CVE-2024-53142 is a buffer overflow flaw in Linux Kernel initramfs that causes filename buffer overrun with non-zero-terminated cpio entries. This article covers technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2024-53142 Overview

CVE-2024-53142 is a buffer overrun vulnerability in the Linux kernel's initramfs subsystem. The vulnerability exists in the do_name() path handler, which processes cpio archive entries during initramfs extraction. When extracting an initramfs cpio archive, the kernel assumes a zero-terminated path at the @collected buffer and passes it directly to functions like filp_open(), init_mkdir(), and init_mknod() without proper validation.

If a specially crafted cpio entry contains a non-zero-terminated filename followed by uninitialized memory, the kernel may create a file with trailing characters representing that uninitialized memory. This out-of-bounds write condition is classified as CWE-787 (Out-of-bounds Write).

Critical Impact

Local attackers with the ability to craft malicious initramfs archives could potentially exploit this buffer overrun to cause memory corruption, leading to denial of service or potentially arbitrary code execution with kernel privileges.

Affected Products

  • Linux Kernel (multiple versions)

Discovery Timeline

  • 2024-12-06 - CVE-2024-53142 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2024-53142

Vulnerability Analysis

The initramfs filename field is defined in the kernel documentation (Documentation/driver-api/early-userspace/buffer-format.rst) with a specific cpio format where the c_namesize field indicates the length of the filename including the final null terminator. The vulnerable code path in do_name() assumes that all filename entries are properly null-terminated at the expected position.

When processing a cpio entry, if the filename lacks a null terminator at the expected (name_len - 1) offset, the kernel continues reading beyond the intended buffer boundary. This results in uninitialized heap memory being included in the filename string, which is then passed to file system operations.

The vulnerability is particularly observable when the initramfs is gzip-compressed, as decompression uses heap-allocated buffers (@out_buf in __gunzip()), making uninitialized memory more likely to contain non-zero values compared to the initrd_start+initrd_size memory block used for uncompressed initramfs.

Root Cause

The root cause is insufficient input validation in the initramfs cpio parser. The do_name() function fails to verify that the filename field contains a null terminator at the expected position before passing the filename string to kernel file system functions. The cpio format specification requires that c_namesize includes the null terminator, but the kernel code implicitly trusts this value without validation.

The symlink handler in do_symlink() is not affected because it explicitly zero-terminates the symlink target, preventing overruns past the data segment.

Attack Vector

The attack requires local access to modify or supply a crafted initramfs image. An attacker would need to:

  1. Create a malicious cpio entry with a non-zero-terminated filename
  2. Inject this entry into an initramfs archive
  3. Have the target system boot with the malicious initramfs

The provided reproducer script demonstrates the vulnerability by creating a cpio entry where the filename padding uses 'A' characters instead of null bytes, causing the kernel to create files with names like /initramfs_test_fname_overrunAA* where the trailing characters come from uninitialized memory.

While the upstream advisory notes that the ability to modify initramfs would typically imply existing full control of the system, this vulnerability could still be relevant in scenarios involving initramfs validation, secure boot chains, or containerized environments that process initramfs images.

Detection Methods for CVE-2024-53142

Indicators of Compromise

  • Presence of unexpected files in the root filesystem with unusual trailing characters in filenames
  • Files created during boot with names matching the pattern of valid paths followed by garbage characters
  • Kernel log messages indicating errors during initramfs extraction
  • Unexplained files with extended ASCII or non-printable characters in filenames

Detection Strategies

  • Monitor for unusual file creation patterns during system boot by examining early boot logs
  • Implement initramfs integrity verification using cryptographic signatures before boot
  • Use kernel auditing facilities to track file operations during initramfs extraction
  • Deploy endpoint detection that can identify malformed cpio archives in initramfs images

Monitoring Recommendations

  • Enable kernel auditing for file creation events during early boot stages
  • Implement file integrity monitoring on critical system directories
  • Monitor for unexpected changes to initramfs images on disk
  • Review system boot logs for anomalous filesystem operations

How to Mitigate CVE-2024-53142

Immediate Actions Required

  • Update the Linux kernel to a patched version that includes the security fix
  • Verify initramfs image integrity before deployment using checksums or signatures
  • Restrict access to systems and processes that can modify initramfs images
  • Audit existing initramfs images for malformed cpio entries

Patch Information

The Linux kernel maintainers have released patches that fix this vulnerability by aborting the initramfs FSM (Finite State Machine) if any cpio entry doesn't carry a zero-terminator at the expected (name_len - 1) offset. Multiple patch commits are available across different kernel branches:

  • Commit 1a423bbbeaf9e3e20c4686501efd9b661fe834db
  • Commit 49d01e736c3045319e030d1e75fb983011abaca7
  • Commit bb7ac96670ab1d8d681015f9d66e45dad579af4d
  • Commit e017671f534dd3f568db9e47b0583e853d2da9b5
  • Commit fb83b093f75806333b6f4ae29b158d2e0e3ec971

Debian has also released security advisories for affected distributions. See the Debian LTS Announcement for additional details.

Workarounds

  • Implement strict access controls on initramfs images and the tools used to create them
  • Use secure boot with signed initramfs images to prevent unauthorized modifications
  • Validate cpio archives before including them in initramfs using archive inspection tools
  • Consider using alternative initramfs formats that provide built-in integrity checks
bash
# Verify initramfs cpio entry integrity before deployment
# Extract and inspect cpio entries for proper null termination
cpio -tv < /path/to/initramfs.cpio | head -20

# Generate SHA256 checksum of initramfs for integrity monitoring
sha256sum /boot/initramfs-$(uname -r).img > /var/lib/initramfs.sha256

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechLinux Kernel

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-787
  • Technical References
  • Linux Kernel Commit Log

  • Linux Kernel Commit Log

  • Linux Kernel Commit Log

  • Linux Kernel Commit Log

  • Debian LTS Announcement

  • Debian LTS Announcement
  • Vendor Resources
  • Linux Kernel Commit Log

  • Linux Kernel Commit Log

  • Linux Kernel Commit Log

  • Linux Kernel Commit Log

  • Linux Kernel Commit Log
  • Related CVEs
  • CVE-2026-23448: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-23447: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31395: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31402: Linux Kernel Buffer Overflow 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