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
    • 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-41012

CVE-2024-41012: Linux Kernel Use-After-Free Vulnerability

CVE-2024-41012 is a use-after-free flaw in the Linux kernel's filelock mechanism that can expose arbitrary kernel memory. This article covers the technical details, affected versions, impact, and mitigation.

Updated: January 22, 2026

CVE-2024-41012 Overview

CVE-2024-41012 is a Use-After-Free vulnerability in the Linux kernel's filelock subsystem that occurs when the fcntl_setlk() function races with close(). When this race condition is triggered, the kernel attempts to remove a lock using do_lock_file_wait(), but this operation can fail under specific circumstances—either when Linux Security Modules (LSMs) deny the lock removal operation or when posix_lock_file() fails due to GFP_KERNEL memory allocation failure during range splitting operations.

The consequence of this vulnerability is that dangling references to freed lock structures remain accessible. When userspace subsequently reads /proc/locks, the lock_get_status() function performs use-after-free reads on these stale references, potentially allowing an attacker to read arbitrary kernel memory.

Critical Impact

This vulnerability enables use-after-free reads in the Linux kernel, potentially allowing local attackers to read arbitrary kernel memory through /proc/locks, leading to information disclosure of sensitive kernel data.

Affected Products

  • Linux Kernel (multiple versions)
  • Linux Kernel 6.10-rc1 through 6.10-rc6
  • Various Linux distributions including Debian

Discovery Timeline

  • July 23, 2024 - CVE-2024-41012 published to NVD
  • November 3, 2025 - Last updated in NVD database

Technical Details for CVE-2024-41012

Vulnerability Analysis

This vulnerability resides in the kernel's POSIX file locking implementation. The race condition occurs in the interaction between fcntl_setlk() and close() system calls. Under normal operation, when a file descriptor is closed while a lock acquisition is in progress, the kernel should cleanly remove any locks that were created. However, the original implementation used do_lock_file_wait() for this cleanup operation, which can fail in two scenarios:

  1. LSM Policy Denial: Linux Security Modules may permit the initial lock creation but deny the subsequent lock removal operation, creating an inconsistent state where the lock object exists but cannot be properly cleaned up.

  2. Memory Allocation Failure: When posix_lock_file() attempts to remove a lock that requires splitting a range in the middle, it needs to allocate memory using GFP_KERNEL. If this allocation fails, the lock removal fails silently, leaving a dangling lock structure.

After the race condition triggers, the affected lock structure becomes invalid but remains referenced in kernel data structures. The lock_get_status() function, which populates /proc/locks for userspace consumption, will read from these freed memory regions—a classic use-after-free condition.

Root Cause

The root cause is the use of do_lock_file_wait() for lock cleanup during the fcntl/close race condition. This function was not designed to reliably remove locks and can fail silently under LSM restrictions or memory pressure. The proper solution is to use locks_remove_posix() instead, which is specifically designed to reliably remove all POSIX locks associated with a given file and files_struct, and is already used by filp_flush() for this exact purpose.

Attack Vector

This is a local attack vector requiring authenticated access to the system. An attacker with local access can exploit this vulnerability by:

  1. Opening a file and initiating a POSIX lock operation via fcntl()
  2. Racing a close() call against the lock operation
  3. Triggering conditions that cause the lock removal to fail (either through LSM policy manipulation or memory pressure)
  4. Reading /proc/locks to trigger use-after-free reads and potentially extract sensitive kernel memory contents

The vulnerability primarily enables information disclosure—attackers can read arbitrary kernel memory but cannot corrupt kernel memory through this specific flaw. However, leaked kernel addresses or sensitive data could facilitate further exploitation of other vulnerabilities.

Detection Methods for CVE-2024-41012

Indicators of Compromise

  • Unusual patterns of rapid fcntl() and close() system calls on the same file descriptors
  • Repeated access to /proc/locks by non-administrative processes
  • Kernel warnings or oops messages related to filelock operations or use-after-free detection
  • Anomalous memory access patterns detected by kernel memory sanitizers (KASAN)

Detection Strategies

  • Enable Kernel Address Sanitizer (KASAN) to detect use-after-free memory access violations in real-time
  • Monitor system call patterns using auditd or eBPF-based tools to identify suspicious fcntl()/close() race patterns
  • Deploy SentinelOne Singularity Platform with Linux agent to detect kernel exploitation attempts and anomalous process behaviors
  • Implement file integrity monitoring on /proc/locks access patterns

Monitoring Recommendations

  • Configure kernel logging to capture filelock subsystem warnings and errors
  • Use performance monitoring tools to track unusual memory allocation failures in kernel context
  • Deploy runtime security solutions that can detect kernel memory corruption attempts
  • Monitor for processes that repeatedly access /proc/locks without legitimate administrative purpose

How to Mitigate CVE-2024-41012

Immediate Actions Required

  • Update the Linux kernel to a patched version that addresses CVE-2024-41012
  • Review and restrict access to /proc/locks if possible in your environment
  • Enable kernel security features such as KASAN in development and testing environments
  • Apply distribution-specific security updates from your Linux vendor

Patch Information

The fix replaces the unreliable do_lock_file_wait() call with locks_remove_posix() for handling the fcntl/close race condition. The locks_remove_posix() function is designed to reliably remove all POSIX locks associated with a given file and files_struct combination, matching the behavior already used in filp_flush().

Multiple patch commits are available across kernel stable branches:

  • Kernel commit 3cad1bc010416c6dd780643476bc59ed742436b9
  • Kernel commit 5f5d0799eb0a01d550c21b7894e26b2d9db55763
  • Kernel commit dc2ce1dfceaa0767211a9d963ddb029ab21c4235

Debian users should refer to the Debian LTS Security Announcement for distribution-specific patch information.

Workarounds

  • Limit local user access to systems running vulnerable kernel versions where possible
  • Implement mandatory access control policies using SELinux or AppArmor to restrict which processes can perform file locking operations
  • Consider restricting read access to /proc/locks to reduce the exploitability of the information disclosure aspect
  • Use container isolation with restricted capabilities to limit kernel attack surface for untrusted workloads
bash
# Check current kernel version for vulnerability assessment
uname -r

# Verify if patched kernel is available in your distribution
apt-cache policy linux-image-$(uname -r)  # Debian/Ubuntu
yum check-update kernel  # RHEL/CentOS

# Restrict /proc/locks access (temporary mitigation)
chmod 400 /proc/locks

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 Kernel

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.01%

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

  • Linux Kernel Commit Note

  • Linux Kernel Commit Note

  • Linux Kernel Commit Note

  • Linux Kernel Commit Note

  • Linux Kernel Commit Note

  • Linux Kernel Commit Note

  • Linux Kernel Commit Note
  • Related CVEs
  • CVE-2026-23462: Linux Kernel Use-After-Free Vulnerability

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

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

  • CVE-2026-23456: 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