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-2026-31516

CVE-2026-31516: Linux Kernel Use-After-Free Vulnerability

CVE-2026-31516 is a use-after-free flaw in the Linux kernel XFRM subsystem caused by policy_hthresh.work racing with namespace teardown. This post covers technical details, affected versions, and mitigation.

Published: April 23, 2026

CVE-2026-31516 Overview

A race condition vulnerability has been identified in the Linux kernel's XFRM (IPsec transformation) subsystem. The vulnerability exists in the handling of policy_hthresh.work during network namespace teardown operations. When a XFRM_MSG_NEWSPDINFO request queues the per-net work item onto the system workqueue, the callback function xfrm_hash_rebuild() retrieves the enclosing struct net via container_of(). If the network namespace is torn down before the queued work executes, the associated struct net may already be freed, leading to a use-after-free condition when xfrm_hash_rebuild() dereferences stale memory.

Critical Impact

This race condition can result in use-after-free memory access in kernel space, potentially leading to system instability, denial of service, or privilege escalation depending on how the freed memory is reallocated.

Affected Products

  • Linux Kernel (multiple stable versions)
  • Systems utilizing XFRM/IPsec transformations with network namespaces
  • Container environments using network namespace isolation

Discovery Timeline

  • 2026-04-22 - CVE CVE-2026-31516 published to NVD
  • 2026-04-23 - Last updated in NVD database

Technical Details for CVE-2026-31516

Vulnerability Analysis

This vulnerability is a classic race condition between asynchronous work queue processing and resource cleanup. The XFRM subsystem uses a per-network-namespace work item (policy_hthresh.work) that can be queued via XFRM_MSG_NEWSPDINFO netlink requests. The vulnerability arises because xfrm_policy_fini(), which handles network namespace teardown cleanup, already flushes policy_hash_work but fails to synchronize policy_hthresh.work.

The xfrm_hash_rebuild() callback uses container_of() to obtain a pointer to the parent struct net from the work item structure. This is a common kernel pattern, but it becomes dangerous when the parent structure can be freed while the work item remains queued. The race window exists between queuing the work and the network namespace being destroyed.

Root Cause

The root cause is incomplete synchronization during network namespace teardown in xfrm_policy_fini(). While the function properly flushes policy_hash_work, it neglects to cancel or flush policy_hthresh.work. This oversight creates a time-of-check-time-of-use (TOCTOU) window where the work item can execute after its associated network namespace has been freed.

The fix involves adding proper synchronization for policy_hthresh.work in xfrm_policy_fini(), ensuring the queued work cannot outlive the network namespace teardown and access freed memory structures.

Attack Vector

The vulnerability can be triggered by an attacker with the ability to send netlink messages and manipulate network namespaces. The attack vector involves:

  1. Creating a network namespace
  2. Sending XFRM_MSG_NEWSPDINFO requests to queue the policy_hthresh.work item
  3. Racing to destroy the network namespace before the work executes
  4. The xfrm_hash_rebuild() callback then operates on freed memory

While local access is typically required, container environments and systems allowing unprivileged user namespaces may be at increased risk.

Detection Methods for CVE-2026-31516

Indicators of Compromise

  • Kernel oops or panic messages referencing xfrm_hash_rebuild or XFRM-related functions
  • KASAN (Kernel Address Sanitizer) reports indicating use-after-free in XFRM subsystem
  • Unexpected system crashes during network namespace creation/destruction operations
  • Memory corruption artifacts in kernel logs related to netlink processing

Detection Strategies

  • Enable KASAN on development/staging systems to detect memory safety violations in the XFRM subsystem
  • Monitor kernel logs for oops, panics, or warnings involving xfrm_policy_fini, xfrm_hash_rebuild, or related functions
  • Implement audit rules for XFRM_MSG_NEWSPDINFO netlink messages to track potential exploitation attempts
  • Use kernel tracing tools (ftrace, eBPF) to monitor XFRM work queue operations during namespace teardown

Monitoring Recommendations

  • Deploy runtime kernel integrity monitoring solutions to detect anomalous kernel behavior
  • Configure centralized logging for all kernel messages to enable correlation of XFRM-related events
  • Implement SentinelOne Singularity Platform for real-time kernel-level threat detection and behavioral analysis
  • Monitor container orchestration platforms for unusual network namespace churn patterns

How to Mitigate CVE-2026-31516

Immediate Actions Required

  • Apply the latest kernel security patches from your distribution vendor
  • Restrict network namespace creation to privileged users where possible by setting user.max_user_namespaces sysctl
  • Audit systems using IPsec/XFRM transformations in containerized environments
  • Enable kernel lockdown mode where supported to limit attack surface

Patch Information

Multiple kernel patches have been released to address this vulnerability. The fix adds synchronization for policy_hthresh.work in xfrm_policy_fini() to ensure proper cleanup ordering. The following commits contain the fix:

  • Kernel Patch Commit 29fe3a6
  • Kernel Patch Commit 4e2e778
  • Kernel Patch Commit 56ea225
  • Kernel Patch Commit 8854e93

Workarounds

  • Limit access to netlink sockets and network namespace operations to trusted users and processes
  • Disable unprivileged user namespaces if not required by setting kernel.unprivileged_userns_clone=0
  • Implement network policy enforcement to restrict container networking operations in orchestrated environments
  • Consider deploying mandatory access control (SELinux/AppArmor) policies to limit XFRM subsystem access
bash
# Disable unprivileged user namespaces as a temporary mitigation
echo 'kernel.unprivileged_userns_clone=0' >> /etc/sysctl.d/99-security.conf
sysctl -p /etc/sysctl.d/99-security.conf

# Limit maximum user namespaces per user
echo 'user.max_user_namespaces=0' >> /etc/sysctl.d/99-security.conf
sysctl -p /etc/sysctl.d/99-security.conf

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

  • SeverityNONE

  • CVSS ScoreN/A

  • EPSS Probability0.02%

  • Known ExploitedNo
  • Impact Assessment
  • ConfidentialityNone
  • IntegrityNone
  • AvailabilityNone
  • Technical References
  • Kernel Patch Commit 29fe3a6

  • Kernel Patch Commit 4e2e778

  • Kernel Patch Commit 56ea225

  • Kernel Patch Commit 8854e93
  • Related CVEs
  • CVE-2026-31745: Linux Kernel Use-After-Free Vulnerability

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

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

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