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

CVE-2022-27666: Linux Kernel Privilege Escalation Flaw

CVE-2022-27666 is a heap buffer overflow privilege escalation vulnerability in Linux Kernel IPsec ESP code that allows local attackers to overwrite kernel heap objects. This article covers technical details, impact, and mitigation.

Published: February 17, 2026

CVE-2022-27666 Overview

A heap buffer overflow vulnerability was discovered in the Linux kernel's IPsec Encapsulating Security Payload (ESP) transformation code. The flaw exists in net/ipv4/esp4.c and net/ipv6/esp6.c, which handle ESP packet processing for IPv4 and IPv6 respectively. This vulnerability allows a local attacker with normal user privileges to overwrite kernel heap objects, potentially leading to local privilege escalation.

Critical Impact

Local attackers can exploit this heap buffer overflow to corrupt kernel memory structures and escalate privileges from a standard user account to root access, compromising system integrity entirely.

Affected Products

  • Linux Kernel (versions prior to 5.17 and including 5.17-rc1 through 5.17-rc7)
  • Fedora 34 and 35
  • Red Hat Enterprise Linux 8.0
  • Red Hat Virtualization 4.0
  • Debian Linux 9.0, 10.0, and 11.0
  • NetApp H-Series Storage Systems (H300S, H500S, H700S, H300E, H500E, H700E, H410S, H410C)

Discovery Timeline

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

Technical Details for CVE-2022-27666

Vulnerability Analysis

This heap buffer overflow vulnerability (CWE-787: Out-of-bounds Write) occurs in the ESP transformation code within the Linux kernel's IPsec implementation. The flaw stems from improper allocation size calculations when processing ESP packets, allowing memory writes beyond the intended buffer boundaries.

The vulnerability requires local access to the system, meaning an attacker must have an existing user account on the target machine. Once exploited, the attacker can overwrite adjacent kernel heap objects, which can be leveraged to gain elevated privileges. The impact is severe as successful exploitation grants the attacker full control over kernel memory, potentially leading to complete system compromise with root-level access.

Root Cause

The root cause lies in insufficient bounds checking during ESP packet transformation. The code failed to properly constrain the maximum fragment size when allocating memory for ESP operations. Without the ESP_SKB_FRAG_MAXSIZE definition limiting the allocation size, an attacker could craft malicious input that triggers a heap overflow condition when the kernel processes ESP-encrypted packets.

Attack Vector

The attack vector is local, requiring the attacker to have a valid user account on the target system. The attacker can trigger the vulnerability by:

  1. Crafting specially formatted IPsec ESP packets with oversized payloads
  2. Sending these packets through the kernel's ESP transformation layer
  3. Causing the kernel to write beyond allocated heap buffer boundaries
  4. Manipulating adjacent heap objects to achieve code execution or privilege escalation

The low attack complexity and no user interaction requirement make this vulnerability particularly dangerous in multi-user environments.

c
// Security patch in include/net/esp.h
// Source: https://github.com/torvalds/linux/commit/ebe48d368e97d007bfeb76fcb065d6cfc4c96645
 
 #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)

The patch introduces ESP_SKB_FRAG_MAXSIZE to constrain the maximum allocation size for ESP fragments, preventing the overflow condition.

c
// Security patch in net/ipv4/esp4.c
// Source: https://github.com/torvalds/linux/commit/ebe48d368e97d007bfeb76fcb065d6cfc4c96645
 	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) {

This patch adds the allocsz variable to properly track and constrain allocation sizes during ESP packet processing.

Detection Methods for CVE-2022-27666

Indicators of Compromise

  • Unusual kernel panic or system crashes related to IPsec/ESP processing
  • Unexpected privilege escalation events from low-privileged user accounts
  • Anomalous memory allocation patterns in kernel logs related to esp4.c or esp6.c
  • Process execution by users that shouldn't have elevated capabilities

Detection Strategies

  • Monitor kernel logs for memory corruption errors or oops messages referencing ESP transformation functions
  • Implement system call auditing to detect unusual IPsec-related socket operations from non-administrative users
  • Deploy kernel-level integrity monitoring to detect unauthorized modifications to kernel memory structures
  • Use SentinelOne's behavioral AI to identify privilege escalation attempts following network stack operations

Monitoring Recommendations

  • Enable kernel auditing for IPsec subsystem operations and socket creation
  • Monitor for processes attempting to load or manipulate IPsec security associations
  • Track user privilege changes and correlate with preceding IPsec-related system activity
  • Implement file integrity monitoring on critical system binaries that could be modified post-exploitation

How to Mitigate CVE-2022-27666

Immediate Actions Required

  • Update the Linux kernel to the latest patched version that includes commit ebe48d368e97d007bfeb76fcb065d6cfc4c96645
  • Apply vendor-specific security updates from Red Hat, Debian, Fedora, or NetApp as applicable
  • Restrict local user access on systems where kernel updates cannot be immediately applied
  • Enable kernel address space layout randomization (KASLR) to increase exploitation difficulty

Patch Information

The vulnerability has been addressed in the upstream Linux kernel through commit ebe48d368e97d007bfeb76fcb065d6cfc4c96645. Major distributions have released corresponding security updates:

  • Red Hat has tracked this issue via Bug #2061633
  • Debian has released fixes in DSA-5127 and DSA-5173
  • NetApp has published Advisory NTAP-20220429-0001

Organizations should prioritize kernel updates through their standard patch management processes.

Workarounds

  • Disable IPsec functionality if not required for operations until patching is complete
  • Implement strict user access controls to limit local access to affected systems
  • Use SELinux or AppArmor policies to restrict unprivileged user access to IPsec functionality
  • Consider network segmentation to isolate systems that cannot be immediately patched
bash
# Verify current kernel version
uname -r

# Check if IPsec modules are loaded
lsmod | grep esp

# Temporarily unload ESP modules if IPsec is not required (requires root)
# WARNING: Only do this if IPsec/VPN functionality is not needed
modprobe -r esp4
modprobe -r esp6

# Blacklist ESP modules to prevent automatic loading (temporary workaround)
echo "blacklist esp4" >> /etc/modprobe.d/disable-esp.conf
echo "blacklist esp6" >> /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 DSA-5127

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

  • GitHub Linux Commit
  • Related CVEs
  • CVE-2026-31413: Linux Kernel BPF Privilege Escalation

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

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

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