Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2021-36087

CVE-2021-36087: SELinux Buffer Overflow Vulnerability

CVE-2021-36087 is a heap-based buffer over-read flaw in SELinux 3.2 affecting the CIL compiler. This vulnerability can compromise system security. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2021-36087 Overview

CVE-2021-36087 is an Out-of-Bounds Read vulnerability affecting the CIL (Common Intermediate Language) compiler in SELinux 3.2. The vulnerability exists in the ebitmap_match_any function, which is called indirectly from cil_check_neverallow. This flaw occurs due to insufficient validation of statements within optional blocks during policy compilation, leading to a heap-based buffer over-read condition.

Critical Impact

An attacker with local access could exploit this vulnerability to cause a denial of service condition by triggering the buffer over-read, potentially crashing the CIL compiler during policy compilation.

Affected Products

  • SELinux Project SELinux 3.2
  • Fedora Project Fedora 35
  • Systems utilizing SELinux CIL compiler for policy compilation

Discovery Timeline

  • 2021-07-01 - CVE-2021-36087 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2021-36087

Vulnerability Analysis

This vulnerability is classified as CWE-125 (Out-of-bounds Read), a memory safety issue that occurs when the CIL compiler processes malformed or crafted SELinux policy files. The root cause lies in the ebitmap_match_any function's failure to properly validate the boundaries of bitmap data structures when processing statements within optional blocks.

The vulnerability was discovered through fuzz testing as part of the OSS-Fuzz project (Issue #32675). During normal operation, the CIL compiler parses and validates SELinux policy rules, including neverallow statements that define forbidden access patterns. When an invalid statement exists within an optional block, the cil_check_neverallow function invokes ebitmap_match_any without adequate bounds checking, causing the compiler to read beyond the allocated heap buffer.

The local attack vector requires an attacker to provide a maliciously crafted CIL policy file to the compiler. While exploitation does not allow arbitrary code execution or data exfiltration, it can disrupt security policy compilation processes, potentially affecting system administration workflows on SELinux-enabled systems.

Root Cause

The vulnerability stems from insufficient input validation within the CIL compiler's optional block processing logic. When the compiler encounters statements in an optional block, it should validate that all referenced elements exist and have proper bounds. The missing checks allow the ebitmap_match_any function to iterate beyond valid memory boundaries when processing bitmap operations related to neverallow rule verification.

Attack Vector

The attack requires local access to provide a crafted CIL policy file to the SELinux compiler. The attacker must be able to invoke the secilc compiler (the standalone CIL compiler) or trigger policy compilation through system administration tools.

The exploitation flow involves:

  1. Crafting a malicious CIL policy file containing invalid statements within optional blocks
  2. Submitting the file for compilation via secilc or policy build processes
  3. The compiler processes the optional block and invokes cil_check_neverallow
  4. The ebitmap_match_any function reads beyond allocated heap memory
  5. The compiler crashes, causing denial of service

For technical details on the vulnerability mechanism and the specific code paths involved, refer to the OSS-Fuzz vulnerability report and the SELinux security commit.

Detection Methods for CVE-2021-36087

Indicators of Compromise

  • Unexpected crashes or segmentation faults in the secilc process during policy compilation
  • Core dumps from SELinux policy compilation tools referencing ebitmap_match_any or cil_check_neverallow
  • Anomalous CIL policy files with unusual optional block structures in policy directories

Detection Strategies

  • Monitor for crashes in SELinux compilation processes using system logging and crash reporting tools
  • Implement file integrity monitoring on CIL policy directories to detect unauthorized modifications
  • Review audit logs for repeated policy compilation failures from the same source
  • Deploy memory sanitizers (AddressSanitizer) in development environments to catch out-of-bounds read attempts

Monitoring Recommendations

  • Enable crash reporting and analysis for secilc and related SELinux tools
  • Monitor system logs for segmentation fault signals from policy compilation processes
  • Set up alerting for multiple consecutive policy compilation failures
  • Review policy source files for structural anomalies before compilation

How to Mitigate CVE-2021-36087

Immediate Actions Required

  • Update SELinux to a patched version containing commit 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
  • Restrict access to policy compilation tools to trusted administrators only
  • Validate the source and integrity of CIL policy files before compilation
  • Monitor for and investigate any unexpected policy compilation failures

Patch Information

The SELinux Project has addressed this vulnerability in commit 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521. This fix adds proper validation checks for statements within optional blocks before processing them in ebitmap_match_any.

Distribution-specific patches are available:

  • Fedora Package Update
  • Debian LTS Security Update
  • NetApp Security Advisory

Workarounds

  • Restrict access to SELinux policy compilation tools using file permissions
  • Implement policy file review processes to validate CIL files before compilation
  • Use containerization or sandboxing when compiling untrusted policy files
  • Consider pre-validation of policy files using static analysis tools
bash
# Restrict secilc access to root only
chmod 750 /usr/bin/secilc
chown root:root /usr/bin/secilc

# Verify SELinux version for patch status
rpm -q selinux-policy-devel 2>/dev/null || dpkg -l selinux-policy-dev 2>/dev/null

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechSelinux

  • SeverityLOW

  • CVSS Score3.3

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-125
  • Technical References
  • OSS-Fuzz Vulnerability OSV-2021-585

  • Fedora Package Announcement

  • SELinux Mailing List Discussion

  • Debian LTS Announcement

  • NetApp Security Advisory ntap-20250207-0004
  • Vendor Resources
  • Chromium OSS-Fuzz Issue #32675

  • GitHub SELinux Commit
  • Related CVEs
  • CVE-2021-36085: SELinux Use-After-Free Vulnerability

  • CVE-2021-36084: SELinux 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