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-58087

CVE-2024-58087: Linux Kernel Race Condition Vulnerability

CVE-2024-58087 is a race condition flaw in the Linux Kernel's ksmbd component affecting session lookup and expiration. This article covers the technical details, affected versions, security impact, and mitigation.

Published: March 11, 2026

CVE-2024-58087 Overview

CVE-2024-58087 is a race condition vulnerability in the Linux kernel's ksmbd (kernel SMB server) module. The vulnerability exists in the session lookup and expire functionality, where the session reference count is not properly incremented within the lock during lookup operations. This creates a time-of-check to time-of-use (TOCTOU) race condition that can be exploited by remote attackers.

The ksmbd module is an in-kernel SMB3 server implementation designed to provide faster SMB file sharing performance compared to userspace implementations like Samba. This race condition occurs when session lookup operations and session expiration events happen concurrently, potentially allowing attackers to access stale or freed session objects.

Critical Impact

Remote attackers can exploit this race condition to potentially achieve high impact on confidentiality, integrity, and availability of affected systems running the ksmbd kernel module.

Affected Products

  • Linux Kernel (multiple versions with ksmbd enabled)
  • Linux Kernel 6.13-rc1
  • Linux Kernel 6.13-rc2

Discovery Timeline

  • March 12, 2025 - CVE-2024-58087 published to NVD
  • October 01, 2025 - Last updated in NVD database

Technical Details for CVE-2024-58087

Vulnerability Analysis

This vulnerability is classified under CWE-667 (Improper Locking), which describes scenarios where a resource is not properly locked during access operations. In the ksmbd module, session management involves concurrent access to session data structures by multiple threads handling SMB connections.

The flaw occurs because the session reference count increment happens outside of the protective lock during session lookup operations. When a session lookup is performed, there's a window between checking the session validity and incrementing its reference count where the session expiration mechanism can free the session object. This creates a classic race condition that can lead to use-after-free scenarios or other memory corruption issues.

Successful exploitation requires an attacker to win the race condition, which involves network-based timing manipulation. While this adds complexity to exploitation, the vulnerability remains exploitable from a network context without requiring authentication or user interaction.

Root Cause

The root cause of this vulnerability is improper synchronization in the ksmbd session management code. Specifically, the session reference count was being incremented after the lookup completed, but outside the critical section protected by the lock. This allowed a race window where:

  1. A lookup operation finds a valid session
  2. The lock is released before incrementing the reference count
  3. The session expiration timer fires and frees the session
  4. The lookup operation attempts to use the now-freed session

The fix addresses this by ensuring the reference count increment occurs within the locked section, eliminating the race window.

Attack Vector

The vulnerability is exploitable over the network, targeting systems running the ksmbd kernel module for SMB file sharing. The attack scenario involves:

The attacker must be able to establish SMB connections to the target ksmbd server and carefully time requests to exploit the race window between session lookup and expiration. While the high complexity (network timing dependent) makes exploitation challenging, successful attacks could result in kernel-level code execution or denial of service conditions.

Since ksmbd operates in kernel space, any memory corruption resulting from this race condition has severe implications for system security and stability.

Detection Methods for CVE-2024-58087

Indicators of Compromise

  • Unexpected kernel crashes or panics related to ksmbd module operations
  • Anomalous SMB connection patterns with rapid session creation and termination
  • Kernel log messages indicating memory corruption or use-after-free in ksmbd functions
  • Increased failed SMB session establishment attempts from external sources

Detection Strategies

  • Monitor kernel logs for ksmbd-related errors, particularly memory access violations or reference counting issues
  • Implement network monitoring for unusual SMB traffic patterns that may indicate race condition exploitation attempts
  • Deploy endpoint detection solutions that can identify kernel-level anomalies in the ksmbd module
  • Use kernel debugging tools (kdump, crash) to analyze any system crashes for ksmbd-related stack traces

Monitoring Recommendations

  • Enable enhanced logging for the ksmbd module to capture session management events
  • Configure network intrusion detection systems to alert on suspicious SMB traffic patterns
  • Monitor system stability metrics for unexplained kernel crashes on systems running ksmbd
  • Implement SentinelOne's kernel-level monitoring to detect exploitation attempts targeting this vulnerability

How to Mitigate CVE-2024-58087

Immediate Actions Required

  • Apply the official kernel patches as soon as possible on all systems running ksmbd
  • If patching is not immediately feasible, consider disabling the ksmbd module and using alternative SMB implementations
  • Restrict network access to SMB services to trusted networks and hosts only
  • Monitor affected systems for signs of exploitation attempts

Patch Information

The Linux kernel maintainers have released patches to address this vulnerability across multiple kernel versions. The fix ensures that the session reference count is incremented within the lock during session lookup operations, eliminating the race condition.

Official patches are available through the following commits:

  • Commit 2107ab40629a
  • Commit 37a0e2b362b3
  • Commit 450a844c045f
  • Commit a39e31e22a53
  • Commit b95629435b84

Additional technical details are available in the Zero Day Initiative Advisory ZDI-25-100.

Workarounds

  • Disable the ksmbd kernel module if SMB file sharing is not required: modprobe -r ksmbd
  • Implement network segmentation to limit exposure of SMB services to untrusted networks
  • Use userspace SMB implementations (Samba) as an alternative until patching is complete
  • Configure firewall rules to restrict SMB port access (TCP 445) to authorized clients only
bash
# Disable ksmbd module
sudo modprobe -r ksmbd

# Prevent ksmbd from loading automatically
echo "blacklist ksmbd" | sudo tee /etc/modprobe.d/blacklist-ksmbd.conf

# Restrict SMB access via firewall (example using iptables)
sudo iptables -A INPUT -p tcp --dport 445 -s trusted_network/24 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 445 -j DROP

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

  • Vulnerability Details
  • TypeRace Condition

  • Vendor/TechLinux Kernel

  • SeverityHIGH

  • CVSS Score8.1

  • EPSS Probability0.28%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-667
  • Vendor Resources
  • Linux Kernel Commit

  • Linux Kernel Commit

  • Linux Kernel Commit

  • Linux Kernel Commit

  • Linux Kernel Commit

  • Zero Day Initiative Advisory
  • Related CVEs
  • CVE-2026-23411: Linux Kernel Race Condition Vulnerability

  • CVE-2026-23410: Linux Kernel Race Condition Vulnerability

  • CVE-2026-23400: Linux Kernel Race Condition Vulnerability

  • CVE-2026-23393: Linux Kernel Race Condition Vulnerability
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