Skip to main content
A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Find Out Why
  • Experiencing a breach?
  • Blog
  • Careers
  • Platform & Products

    • Singularity™ Platform

      Unified Enterprise Security. Machine-Speed Protection, Intelligence, and Response.

    • XDR

      Native and Open Protection, Detection, and Response.

    • Integrations and Partners

      One-Click Integrations to Unlock the Power of SentinelOne.

    Product Tours
    Pricing & Packages
    Get a Demo
  • Solutions & Use Cases

    SentinelOne for Industries

    Security Tuned for Your Industry.

    See All Industries
    • Healthcare

      Protect Patient Data. Keep Clinical Systems Online.

    • Financial Services

      Stop Fraud and Ransomware. Stay Audit-Ready.

    • Federal Government

      FedRAMP and IL5-Ready Defense for Federal Missions.

    • Manufacturing

      Defend OT, IT, IIOT, and Supply Chains at Scale.

    • Energy

      Secure OT Systems and Critical Infrastructure.

    • Transportation and Logistics

      Defend Operations Across Fleet, Port, and Rail.

    • Higher Education

      Protect Open Networks Without Slowing Research.

    • K-12 Education

      Stop Ransomware. Protect Students, Staff, and Data.

    • Retail and Hospitality

      Defend Your Brand, Customer Data, and Bottom Line.

    • SMB & Startups

      Enterprise-Grade Defense for Fast Teams.

    See all solutions
  • Services

    Managed Services

    Wayfinder Threat Detection and Response.

    Learn More
    • Threat Hunting

      World-Class Expertise and Threat Intelligence.

    • Managed Detection and Response

      24/7 Expert MDR Across Your Entire Environment.

    • Incident Readiness and Response

      DFIR, Breach Readiness, and Compromise Assessments.

    Experiencing a breach?

    Our experts are here to help 24/7.

    1-855-868-3733
    Get Help Now
  • Partners

    Become a Partner

    • Become a SentinelOne Partner

      Join the Global SentinelOne Ecosystem

    • Explore MSSP Solutions

      Services Succeed Faster with SentinelOne

    • Form a Technology Alliance

      Integrated, Enterprise-Scale Solutions

    Find a Partner

    • Enlist a Response or Advisory Team

      Enlist Pro Response and Advisory Teams

    • SentinelOne for AWS

      Hosted Across AWS Regions Worldwide

    • SentinelOne for Google

      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale

    • Partner Locator

      Your Go-to Source for Our Top Partners in Your Region

    • Singularity Marketplace

      One-Click Integrations for Unified Prevention, Detection, and Response

      Explore integrations
    Partner Portal Login
  • Why SentinelOne

    • Why Choose SentinelOne

      AI-Powered Cybersecurity Built to Secure What’s Next.

    • Our Customers

      Trusted by the World’s Leading Companies.

    • Industry Awards & Recognition

      Tested and Proven by the Experts.

  • Resources & Support

    Resources

    • Resource Center
    • Webinars
    • Cybersecurity Blog
    • Events
    • Newsroom

    Company

    • About SentinelOne
    • Careers
    • S Ventures
    • S Foundation
    • Dataset
    • FAQ
    • Investors Relations

    Customer Success & Support

    • Live and On-Demand Training
    • Guided Onboarding & Deployment
    • Technical Account Management
    • Support Services
    • Customer Portal
    • Get Support Now

    Explore

    • Vulnerability Database
    • SentinelLABS Threat Research
    • Ransomeware Anthology
    • Cybersecurity 101
    EventJoin us at OneCon (Oct. 20–22, 2026)
    CompetitionThreat Hunting World Championship 2026
    ReportThe SentinelOne Annual Threat Report
  • Pricing
Get StartedContact us

Explore SentinelOne

  • Pricing
Events
Get StartedContact us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-38160

CVE-2021-38160: Linux Kernel Buffer Overflow Vulnerability

CVE-2021-38160 is a buffer overflow flaw in Linux Kernel's virtio_console driver that can cause data corruption when triggered by untrusted devices. This article covers technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-38160 Overview

CVE-2021-38160 is a buffer overflow vulnerability in the Linux kernel's virtio_console driver (drivers/char/virtio_console.c). The vulnerability exists in kernel versions before 5.13.4 and allows data corruption or loss when an untrusted device supplies a buf->len value that exceeds the allocated buffer size. This occurs due to insufficient validation of length values received from the virtual device, potentially enabling local attackers with low privileges to achieve code execution or cause system instability.

Critical Impact

A malicious or compromised virtual device can supply crafted buffer length values to trigger memory corruption, potentially leading to privilege escalation, data corruption, or denial of service in virtualized environments.

Affected Products

  • Linux Kernel (versions prior to 5.13.4)
  • NetApp HCI Bootstrap OS
  • NetApp HCI Compute Node
  • NetApp HCI Management Node
  • NetApp SolidFire
  • NetApp HCI Storage Node
  • NetApp Element Software
  • Debian Linux 9.0 and 10.0
  • Red Hat Enterprise Linux 8.0

Discovery Timeline

  • 2021-08-07 - CVE-2021-38160 published to NVD
  • 2025-05-05 - Last updated in NVD database

Technical Details for CVE-2021-38160

Vulnerability Analysis

The vulnerability resides in the virtio_console driver, which handles virtual console devices in Linux virtualization environments. When retrieving buffers from the virtqueue via virtqueue_get_buf(), the driver directly assigns the length value provided by the device to the buffer's len field without validating that it does not exceed the buffer's actual allocated size. This missing bounds check creates a classic buffer overflow condition (CWE-120) where subsequent operations may read or write beyond the allocated buffer boundaries.

In virtualized environments where the host system or hypervisor may be untrusted or compromised, this vulnerability presents a significant risk. An attacker controlling the virtual device could manipulate the reported buffer length to cause out-of-bounds memory access, potentially corrupting kernel data structures or achieving arbitrary code execution within the guest kernel.

Root Cause

The root cause is the absence of length validation in the virtio_console driver when processing buffer lengths from the virtqueue. The driver trusts the len value returned by virtqueue_get_buf() without verifying it against the actual buffer size (buf->size). This violates the principle of never trusting data from external or potentially untrusted sources, especially in virtualization contexts where the guest kernel should not implicitly trust the host.

Attack Vector

The attack requires local access to a virtualized system where the attacker can control or influence the virtual device behavior. The attack vector is local with low attack complexity and requires low privileges. An attacker would need to:

  1. Gain control over the virtual device or host hypervisor
  2. Supply a malicious buffer length value through the virtqueue that exceeds the allocated buffer size
  3. Trigger buffer operations that use the corrupted length value
  4. Exploit the resulting memory corruption for privilege escalation or system compromise
c
 
 	buf = virtqueue_get_buf(port->in_vq, &len);
 	if (buf) {
-		buf->len = len;
+		buf->len = min_t(size_t, len, buf->size);
 		buf->offset = 0;
 		port->stats.bytes_received += len;
 	}

Source: GitHub Linux Commit

The fix adds a bounds check using min_t() to ensure the assigned length never exceeds the buffer's actual size, preventing buffer overflow regardless of the value supplied by the device.

Detection Methods for CVE-2021-38160

Indicators of Compromise

  • Unexpected kernel panics or system crashes in virtualized environments running affected kernel versions
  • Anomalous memory access patterns or corruption in kernel memory regions associated with virtio_console operations
  • Unusual behavior in virtual console devices or unexpected buffer handling errors in system logs
  • Evidence of privilege escalation attempts originating from virtualized workloads

Detection Strategies

  • Monitor kernel version across all virtualized systems to identify instances running kernels prior to 5.13.4
  • Implement kernel-level monitoring for buffer overflow conditions in virtio subsystem drivers
  • Deploy endpoint detection solutions capable of identifying anomalous kernel memory access patterns
  • Review system logs for virtio_console-related errors or unexpected device behavior

Monitoring Recommendations

  • Enable kernel auditing for virtio device operations in virtualized environments
  • Configure alerting for kernel crashes or panics that may indicate exploitation attempts
  • Monitor for unexpected changes in kernel memory regions used by virtio_console
  • Implement continuous vulnerability scanning to track kernel versions across infrastructure

How to Mitigate CVE-2021-38160

Immediate Actions Required

  • Update the Linux kernel to version 5.13.4 or later on all affected systems
  • Apply vendor-specific patches from distribution maintainers (Debian, Red Hat, NetApp)
  • Prioritize patching for systems in virtualized environments where host trust is a concern
  • Review and restrict access to virtual device configurations in hypervisor settings

Patch Information

The vulnerability is addressed in Linux kernel version 5.13.4. The fix introduces bounds checking using min_t(size_t, len, buf->size) to ensure buffer lengths cannot exceed the allocated buffer size. The patch is available via the Linux Kernel ChangeLog 5.13.4 and the GitHub Linux Commit.

Distribution-specific patches are available from:

  • Debian Security Advisory DSA-4978
  • Red Hat CVE Analysis
  • NetApp Security Advisory NTAP-20210902-0010

Workarounds

  • Limit the use of virtio_console in high-security virtualized environments until patches can be applied
  • Ensure strict access controls on hypervisor and virtual device configurations to prevent untrusted device manipulation
  • Consider disabling virtio_console functionality if not required for operations
  • Implement additional monitoring and runtime protection for kernel operations in virtualized systems
bash
# Check current kernel version for vulnerability status
uname -r

# Verify if virtio_console module is loaded
lsmod | grep virtio_console

# Update kernel on Debian-based systems
apt-get update && apt-get upgrade linux-image-$(uname -r)

# Update kernel on Red Hat-based systems
yum update kernel

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.04%

  • 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-120
  • Technical References
  • Red Hat CVE Analysis

  • Debian LTS Announcement October 2021

  • Debian LTS Announcement December 2021

  • NetApp Security Advisory NTAP-20210902-0010

  • Debian Security Advisory DSA-4978
  • Vendor Resources
  • Linux Kernel ChangeLog 5.13.4

  • GitHub Linux Commit
  • Related CVEs
  • CVE-2026-46332: Linux Kernel Buffer Overflow Vulnerability

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

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

  • CVE-2026-46289: Linux Kernel Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
Get a DemoContact Us
  • Product Tours
  • Why SentinelOne
  • Pricing & Packages
  • FAQ
  • SentinelOne Status

Key Products & Solutions

  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Prompt Security
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Explore Solutions

Services

  • Wayfinder TDR
  • Managed Detection and Response
  • Threat Hunting
  • Incident Readiness
& Response
  • Technical Account Management
  • Guided Onboarding 
& Deployment
  • Support Services

Company

  • About Us
  • Our Customers
  • Careers
  • Partners
  • S1 Foundation
  • S1 Ventures
  • Legal Information
  • Security & Compliance
  • Investor Relations

Quick Links

  • Customer Portal
  • Partner Portal
  • Become a Partner
  • Resource Center
  • SentinelLABS Threat Research
  • Blog
  • Press Center
  • Cybersecurity 101
  • Events
  • Ransomware Anthology
©2026 SentinelOne, All Rights Reserved
Privacy NoticeTerms of Use
English
English