Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI 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-47939

CVE-2022-47939: Linux Kernel Use-After-Free Vulnerability

CVE-2022-47939 is a use-after-free flaw in the Linux kernel's ksmbd component that can cause system crashes. This article covers the technical details, affected kernel versions 5.15-5.19, impact analysis, and mitigation.

Published: February 18, 2026

CVE-2022-47939 Overview

CVE-2022-47939 is a use-after-free vulnerability discovered in the ksmbd (Kernel SMB Direct) module of the Linux kernel versions 5.15 through 5.19 before 5.19.2. The flaw exists in fs/ksmbd/smb2pdu.c and can be triggered when handling SMB2_TREE_DISCONNECT requests, potentially leading to kernel OOPS conditions and remote code execution.

Critical Impact

This use-after-free vulnerability in the Linux kernel's SMB server implementation allows unauthenticated remote attackers to execute arbitrary code at the kernel level, potentially achieving complete system compromise without any user interaction required.

Affected Products

  • Linux Kernel versions 5.15 through 5.19 (before 5.19.2)
  • Systems with ksmbd module enabled and exposed to the network
  • Linux-based file servers using the in-kernel SMB implementation

Discovery Timeline

  • December 23, 2022 - CVE-2022-47939 published to NVD
  • April 14, 2025 - Last updated in NVD database

Technical Details for CVE-2022-47939

Vulnerability Analysis

The vulnerability exists within the ksmbd module, which provides an in-kernel SMB3 server implementation for the Linux kernel. The flaw is classified as CWE-416 (Use After Free), a memory corruption vulnerability that occurs when a program continues to use a pointer after the memory it references has been freed.

In this specific case, the vulnerability manifests in the smb2_tree_disconnect function within fs/ksmbd/smb2pdu.c. When processing SMB2_TREE_DISCONNECT requests, the code improperly handles the tree connection object, leaving a dangling pointer that can be subsequently accessed. The vulnerability is particularly dangerous because it can be triggered remotely over the network without requiring authentication or user interaction.

The exploitation potential is significant as successful exploitation grants attackers kernel-level code execution privileges on vulnerable systems. This represents the highest level of system access, allowing complete control over the affected machine.

Root Cause

The root cause of CVE-2022-47939 is improper memory management in the SMB2 tree disconnect handling code. After calling ksmbd_tree_conn_disconnect() to terminate the tree connection, the work->tcon pointer was not set to NULL. This left a dangling pointer that could be dereferenced in subsequent operations, leading to use-after-free conditions.

The vulnerable code path did not properly nullify the tree connection reference after disconnection, creating a window where freed memory could be accessed through the stale pointer.

Attack Vector

The attack can be executed remotely over the network against systems running the ksmbd module with SMB file sharing enabled. An attacker needs network access to the SMB server port (typically TCP 445) to exploit this vulnerability. The attack requires:

  1. Network connectivity to the target SMB server
  2. Ability to establish an SMB session and tree connection
  3. Sending a crafted SMB2_TREE_DISCONNECT request to trigger the use-after-free condition

No authentication or special privileges are required, making this vulnerability particularly dangerous for exposed SMB servers.

c
// Security patch from fs/ksmbd/smb2pdu.c
// Source: https://github.com/torvalds/linux/commit/cf6531d98190fa2cf92a6d8bbc8af0a4740a223c
 
	ksmbd_close_tree_conn_fds(work);
	ksmbd_tree_conn_disconnect(sess, tcon);
+	work->tcon = NULL;
	return 0;
}

The fix adds a single line (work->tcon = NULL;) that nullifies the tree connection pointer after disconnection, preventing any subsequent use-after-free access to the freed memory.

Detection Methods for CVE-2022-47939

Indicators of Compromise

  • Unexpected kernel OOPS or panic events related to ksmbd module operations
  • Anomalous SMB2_TREE_DISCONNECT requests in network traffic, especially from unexpected sources
  • Kernel log entries showing memory corruption or invalid memory access in ksmbd components
  • Suspicious network connections to SMB ports (TCP 445) from untrusted IP addresses

Detection Strategies

  • Monitor kernel logs for ksmbd-related crashes, memory errors, or unexpected behavior using dmesg or journald
  • Implement network intrusion detection rules to identify abnormal SMB2 protocol sequences and malformed disconnect requests
  • Deploy endpoint detection and response (EDR) solutions capable of monitoring kernel module activity and memory access patterns
  • Use SentinelOne's Singularity platform to detect exploitation attempts through behavioral analysis of kernel-level anomalies

Monitoring Recommendations

  • Enable detailed ksmbd logging and forward logs to a centralized SIEM for correlation and analysis
  • Configure network monitoring to alert on high volumes of SMB tree disconnect operations or connections from unusual sources
  • Implement file integrity monitoring on systems running ksmbd to detect unauthorized modifications
  • Regularly audit systems for kernel version compliance and patch status

How to Mitigate CVE-2022-47939

Immediate Actions Required

  • Update the Linux kernel to version 5.19.2 or later immediately on all systems running ksmbd
  • If immediate patching is not possible, disable the ksmbd kernel module using modprobe -r ksmbd
  • Restrict network access to SMB services using firewall rules to limit exposure to trusted networks only
  • Consider migrating to user-space SMB implementations (such as Samba) until patching is complete

Patch Information

The vulnerability was patched in Linux kernel version 5.19.2. The fix is available in commit cf6531d98190fa2cf92a6d8bbc8af0a4740a223c. Organizations should apply this patch through their standard kernel update process. Detailed changelog information is available in the Linux Kernel Changelog 5.19.2.

Additional technical details about the patch can be found in the GitHub Linux Commit Record and the Zero Day Initiative Advisory ZDI-22-1690.

Workarounds

  • Disable the ksmbd module entirely if SMB file sharing is not required: echo "blacklist ksmbd" >> /etc/modprobe.d/blacklist.conf
  • Block external access to SMB ports (TCP 445, 139) at the network perimeter using firewall rules
  • Use Samba as an alternative SMB implementation while awaiting kernel updates
  • Implement network segmentation to isolate file servers from untrusted network segments
bash
# Configuration example - Disable ksmbd module and block SMB access
# Blacklist ksmbd module to prevent loading
echo "blacklist ksmbd" >> /etc/modprobe.d/blacklist.conf

# Unload ksmbd if currently loaded
modprobe -r ksmbd

# Block external SMB access using iptables
iptables -A INPUT -p tcp --dport 445 -s ! 10.0.0.0/8 -j DROP
iptables -A INPUT -p tcp --dport 139 -s ! 10.0.0.0/8 -j DROP

# Verify ksmbd module is not loaded
lsmod | grep ksmbd

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

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechLinux

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability1.14%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-416
  • Technical References
  • OpenWall OSS Security Discussion

  • SecPod Blog Critical Vulnerability

  • Zero Day Initiative Advisory ZDI-22-1690
  • Vendor Resources
  • Linux Kernel Changelog 5.19.2

  • Linux Commit Change

  • GitHub Linux Commit Record
  • Related CVEs
  • CVE-2026-23427: Linux Kernel Use-After-Free Vulnerability

  • CVE-2026-23428: Linux Kernel Use-After-Free Vulnerability

  • CVE-2026-23443: Linux Kernel Use-After-Free Vulnerability

  • CVE-2026-23322: Linux Kernel Use-After-Free 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