A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2024-58087

CVE-2024-58087: Linux Kernel Race Condition Vulnerability

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

Updated: May 16, 2026

CVE-2024-58087 Overview

CVE-2024-58087 is a race condition vulnerability in the Linux kernel's ksmbd in-kernel SMB3 server. The flaw exists in the session lookup logic, where the session reference count was incremented outside of the protective lock. This created a timing window where a session could expire concurrently with a lookup operation, leading to inconsistent state on the session object [CWE-667 - Improper Locking].

The issue affects Linux kernel versions including 6.13-rc1 and 6.13-rc2 release candidates. The vulnerability is exploitable over the network without authentication, but requires high attack complexity due to the precise timing needed to win the race. Successful exploitation can impact confidentiality, integrity, and availability of the target system.

Critical Impact

Network-adjacent attackers can trigger a race between ksmbd session lookup and session expiration, potentially leading to memory corruption or denial of service on systems exposing the ksmbd SMB server.

Affected Products

  • Linux Kernel (multiple stable branches prior to fix)
  • Linux Kernel 6.13-rc1
  • Linux Kernel 6.13-rc2

Discovery Timeline

  • 2025-03-12 - CVE-2024-58087 published to NVD
  • 2026-04-23 - Last updated in NVD database

Technical Details for CVE-2024-58087

Vulnerability Analysis

The vulnerability resides in the ksmbd kernel module, which implements an SMB3 file server in the Linux kernel. ksmbd maintains a table of active client sessions and uses reference counting to manage session lifetimes. Multiple kernel threads can perform session lookups concurrently while a separate expiration path tears down stale sessions.

In the pre-patch code, the lookup routine acquired a lock to find the matching session structure, released the lock, and then incremented the session reference count. During the window between unlock and refcount increment, the session expiration handler could observe a zero refcount and proceed to free the session. The lookup thread then operated on memory that had been released, producing classic use-after-free conditions.

The upstream fix moves the reference count increment inside the lock held during lookup. This ensures expire logic cannot remove the session between the lookup match and the refcount bump.

Root Cause

The root cause is improper locking around reference counting [CWE-667]. The session reference count was treated as independent of the lookup lock, breaking the invariant that a successful lookup must atomically pin the returned object. Any concurrent code path checking the refcount could race with consumers that had not yet acquired their reference.

Attack Vector

Exploitation requires a remote attacker to reach the SMB service exposed by ksmbd over the network. The attacker must drive concurrent SMB session establishment, lookup, and expiration operations to land the race window. No prior authentication is required because session lookup occurs during the SMB negotiation and authentication flow. Successful timing yields use-after-free against the freed session object, which can be leveraged for kernel memory corruption, information disclosure, or denial of service.

No verified public proof-of-concept code is available. See the Zero Day Initiative Advisory ZDI-25-100 and the upstream kernel commits for technical details.

Detection Methods for CVE-2024-58087

Indicators of Compromise

  • Unexpected kernel oops or panic messages referencing ksmbd_session, ksmbd_session_lookup, or ksmbd_expire_session functions in dmesg and /var/log/kern.log.
  • KASAN reports indicating use-after-free in the ksmbd module on kernels built with sanitizers enabled.
  • Sudden termination or restart of the ksmbd.mountd userspace helper alongside kernel stack traces.

Detection Strategies

  • Monitor for repeated, rapid SMB session establishment and teardown patterns from a single source against ksmbd hosts, which can indicate race-window probing.
  • Inspect kernel ring buffer logs for BUG:, WARNING:, or general protection fault entries originating in fs/smb/server/.
  • Correlate network telemetry showing concurrent SMB connections from the same client with subsequent kernel instability events.

Monitoring Recommendations

  • Forward kernel logs to a centralized logging system and alert on oops or panic strings tied to ksmbd.
  • Track the running kernel version across the fleet and flag hosts still running pre-patch builds with ksmbd enabled.
  • Audit which hosts expose TCP port 445 externally and reduce exposure where ksmbd is in use.

How to Mitigate CVE-2024-58087

Immediate Actions Required

  • Update the Linux kernel to a version containing the fix from your distribution vendor. Reference the upstream commits below to confirm backport inclusion.
  • Restrict network access to TCP port 445 on ksmbd hosts using host or perimeter firewalls until patches are applied.
  • Disable the ksmbd module on systems that do not require it by unloading with modprobe -r ksmbd and blacklisting the module.

Patch Information

The vulnerability is resolved by moving the session reference count increment inside the lookup lock. The fix is present in the upstream kernel via the following commits: 2107ab40629a, 37a0e2b362b3, 450a844c045f, a39e31e22a53, and b95629435b84. Additional context is available in the Zero Day Initiative Advisory.

Workarounds

  • Unload and blacklist the ksmbd kernel module where SMB server functionality is not required on the host.
  • Replace ksmbd with userspace Samba (smbd) until the kernel is patched, since this vulnerability is specific to the in-kernel server.
  • Limit SMB exposure to trusted management VLANs and authenticated clients only, reducing the population of network actors able to drive the race.
bash
# Disable and blacklist the ksmbd module until patched
sudo systemctl stop ksmbd
sudo modprobe -r ksmbd
echo 'blacklist ksmbd' | sudo tee /etc/modprobe.d/blacklist-ksmbd.conf

# Verify the running kernel version after update
uname -r

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

  • 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-46223: Linux Kernel Race Condition Vulnerability

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

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

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