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-2022-27666

CVE-2022-27666: Linux Kernel Privilege Escalation Flaw

CVE-2022-27666 is a heap buffer overflow in Linux Kernel's IPsec ESP code that enables local privilege escalation. This article covers the technical details, affected versions, security impact, and mitigation.

Updated: May 16, 2026

CVE-2022-27666 Overview

CVE-2022-27666 is a heap buffer overflow vulnerability in the Linux kernel's IPsec Encapsulating Security Payload (ESP) transformation code. The flaw resides in net/ipv4/esp4.c and net/ipv6/esp6.c, where the ESP transformation routine allocates an insufficiently sized buffer for outbound packets. A local user with normal privileges can trigger the overflow to overwrite adjacent kernel heap objects. Successful exploitation enables local privilege escalation to root. The issue affects Linux kernel versions up to 5.17 release candidates, along with downstream distributions from Red Hat, Fedora, Debian, and NetApp ONTAP Select appliances. The vulnerability is tracked under [CWE-787] Out-of-Bounds Write.

Critical Impact

A local unprivileged user can overwrite kernel heap memory through the IPsec ESP transformation path, leading to full local privilege escalation on unpatched Linux systems.

Affected Products

  • Linux kernel versions up to and including 5.17-rc7
  • Red Hat Enterprise Linux 8 and Red Hat Virtualization 4.0
  • Debian Linux 9, 10, 11 and Fedora 34, 35
  • NetApp HCI storage and compute nodes (H300S/E, H500S/E, H700S/E, H410S, H410C)

Discovery Timeline

  • 2022-03-23 - CVE-2022-27666 published to the National Vulnerability Database
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-27666

Vulnerability Analysis

The vulnerability lives inside the ESP output path used by the Linux kernel's XFRM IPsec stack. When the kernel processes an outbound packet that requires ESP encryption, it constructs a scatter-gather list backed by pages allocated through the page fragment allocator. The transformation routine in esp_output_head() failed to enforce an upper bound on the combined size of the packet payload, ESP trailer, integrity check value, and any TCP/UDP encapsulation overhead. When the requested length exceeded the maximum page fragment size, the kernel wrote past the allocated buffer into adjacent heap objects.

The overflow occurs in kernel context against slab allocations, giving an attacker direct influence over neighboring kernel objects. Researchers demonstrated that a local user can shape the slab layout and use the overwrite to corrupt function pointers or reference counters, ultimately gaining CAP_SYS_ADMIN or root execution. The bug requires only a usable IPsec transform policy, which an unprivileged user can install when user namespaces are enabled on the target system.

Root Cause

The ESP transformation code computed the tail length and allocation size without validating that the total exceeded PAGE_SIZE << SKB_FRAG_PAGE_ORDER. The patch introduces an ESP_SKB_FRAG_MAXSIZE macro and an allocsz check that forces the kernel to fall back to a linearized skb when the size would overflow the fragment buffer.

Attack Vector

Exploitation is local and requires the attacker to send crafted traffic through an IPsec transform that they control. On distributions where unprivileged user namespaces are enabled, a normal user can create the namespace, install an XFRM state, and trigger the ESP transformation path entirely from userspace.

c
// Patch in include/net/esp.h adds a bound for fragment allocations
#include <linux/skbuff.h>

#define ESP_SKB_FRAG_MAXSIZE (PAGE_SIZE << SKB_FRAG_PAGE_ORDER)

struct ip_esp_hdr;

static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb)
c
// Patch in net/ipv4/esp4.c introduces allocsz validation in esp_output_head()
	struct page *page;
	struct sk_buff *trailer;
	int tailen = esp->tailen;
	unsigned int allocsz;

	/* this is non-NULL only with TCP/UDP Encapsulation */
	if (x->encap) {

Source: Linux kernel commit ebe48d3

Detection Methods for CVE-2022-27666

Indicators of Compromise

  • Unexpected kernel oops or BUG: KASAN: slab-out-of-bounds entries in dmesg referencing esp_output_head or esp6_output_head.
  • Unprivileged processes that suddenly acquire elevated capabilities or spawn root-owned shells after creating user namespaces.
  • Loading of the esp4, esp6, or xfrm_user modules by non-administrative users on systems that do not normally use IPsec.

Detection Strategies

  • Audit kernel ring buffer messages for slab corruption signatures and stack traces that include the ESP transformation functions.
  • Monitor auditd for setsockopt calls with IPPROTO_IP and XFRM netlink operations originating from non-root users.
  • Correlate user namespace creation (unshare(CLONE_NEWUSER)) with subsequent XFRM policy installation on multi-user systems.

Monitoring Recommendations

  • Enable kernel address sanitizer (KASAN) and lockdown mode in test environments to surface heap corruption reproducers.
  • Forward dmesg, auditd, and journald logs to a central analytics platform for cross-host pattern matching.
  • Track installed kernel package versions across the fleet and alert when hosts run kernels predating the upstream fix.

How to Mitigate CVE-2022-27666

Immediate Actions Required

  • Apply the vendor kernel updates from Red Hat, Debian, Fedora, and NetApp that incorporate commit ebe48d3 into the running kernel.
  • Reboot systems after patching to ensure the vulnerable esp4/esp6 modules are reloaded from the fixed binaries.
  • Disable unprivileged user namespaces on multi-tenant hosts where IPsec is not required for normal workloads.

Patch Information

The upstream fix is committed as ebe48d368e97d007bfeb76fcb065d6cfc4c96645 in the Linux kernel tree. Distribution patches are available through Debian Security Advisory DSA-5127, Debian Security Advisory DSA-5173, NetApp Security Advisory NTAP-20220429-0001, and Red Hat Bug 2061633.

Workarounds

  • Blacklist the esp4 and esp6 kernel modules on hosts that do not require IPsec ESP transformations.
  • Restrict creation of user namespaces by setting kernel.unprivileged_userns_clone=0 via sysctl.
  • Limit CAP_NET_ADMIN to administrative accounts so unprivileged users cannot install XFRM states.
bash
# Disable unprivileged user namespaces and block ESP modules
sysctl -w kernel.unprivileged_userns_clone=0
echo 'install esp4 /bin/true' | sudo tee /etc/modprobe.d/disable-esp.conf
echo 'install esp6 /bin/true' | sudo tee -a /etc/modprobe.d/disable-esp.conf

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechLinux Kernel

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.80%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-787
  • Technical References
  • NetApp Security Advisory NTAP-20220429-0001

  • Debian Security Advisory DSA-5127

  • Debian Security Advisory DSA-5173
  • Vendor Resources
  • Red Hat Bug Report #2061633

  • GitHub Linux Commit
  • Related CVEs
  • CVE-2026-52906: Linux Kernel Privilege Escalation Flaw

  • CVE-2026-46328: Linux Kernel Privilege Escalation Flaw

  • CVE-2026-46325: Linux Kernel Privilege Escalation Flaw

  • CVE-2026-46318: Linux Kernel Privilege Escalation Flaw
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