CVE-2021-36084
Low · 3.3CVSS
3.3
EPSS
0.5%
Published
Jul 1, 2021
CISA due date
—
Cloudanix analysis
A bug in the tool that compiles SELinux security rules could let someone on the same computer crash the compiler by feeding it a specially made file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free vulnerability in the CIL compiler's __cil_verify_classperms function (invoked via __cil_verify_classpermission and __cil_pre_verify_helper) allows a local attacker to trigger memory corruption or a crash when processing a malicious policy file.
Why it matters to the business
Local users or automated policy compilation processes could experience denial-of-service crashes or instability when handling untrusted SELinux policy sources, potentially disrupting system hardening or policy deployment workflows.
How an attack unfolds
An attacker crafts a malicious CIL policy file that triggers the use-after-free during verification of class permissions; when the file is compiled by the vulnerable CIL compiler (for example via semodule or checkpolicy), the freed memory is accessed, leading to a crash or limited memory corruption.
How to fix it
Upgrade selinuxproject/selinux to the commit f34d3d30c8325e4847a6b696fe7a3936a8a361f3 or later; rebuild and reinstall affected tools such as the CIL compiler and policy utilities; avoid compiling untrusted CIL policy files until patched.
How to confirm the fix worked
Confirm the installed SELinux tools were built from a source tree containing commit f34d3d30c8325e4847a6b696fe7a3936a8a361f3; test compilation of known-triggering CIL samples to verify absence of crashes; review build logs and package versions for the fix.
Typical attack path
- Identify or obtain access to a system using vulnerable SELinux CIL compiler
- Create a specially crafted CIL source file that exercises the verification path
- Invoke the compiler (directly or via policy management tools) on the malicious file
- Trigger the use-after-free resulting in crash or memory corruption
How to detect it
Review system and application logs for unexpected crashes or segmentation faults in CIL-related binaries (cil, checkpolicy, semodule) during policy compilation; look for repeated invocations of policy tools on files from untrusted sources.
What your security team should do
- Apply the upstream commit f34d3d30c8325e4847a6b696fe7a3936a8a361f3 immediately on all systems that compile CIL policies
- Restrict local compilation of untrusted SELinux policies until patched
- Monitor for policy compilation failures or crashes in logs
The record
The CIL compiler in SELinux 3.2 has a use-after-free in __cil_verify_classperms (called from __cil_verify_classpermission and __cil_pre_verify_helper).
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | libsepol | 0 | 2.9-3.el8 |
| AlmaLinux:8 | libsepol-devel | 0 | 2.9-3.el8 |
| AlmaLinux:8 | libsepol-static | 0 | 2.9-3.el8 |
| Debian:11 | libsepol | 0 | No fix |
| Debian:11 | libsepol | 0 | 3.1-1+deb11u1 |
| Debian:12 | libsepol | 0 | 3.3-1 |
| Debian:13 | libsepol | 0 | 3.3-1 |
| Red Hat:enterprise_linux:8::baseos | libsepol | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::baseos | libsepol-debuginfo | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::baseos | libsepol-debugsource | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::baseos | libsepol-devel | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::baseos | libsepol-static | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::crb | libsepol | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::crb | libsepol-debuginfo | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::crb | libsepol-debugsource | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::crb | libsepol-devel | 0 | 0:2.9-3.el8 |
| Red Hat:enterprise_linux:8::crb | libsepol-static | 0 | 0:2.9-3.el8 |
| Rocky Linux:8 | libsepol | 0 | 0:2.9-3.el8 |
| Ubuntu:18.04:LTS | libsepol | 0 | 2.7-1ubuntu0.1 |
| Ubuntu:20.04:LTS | libsepol | 0 | 3.0-1ubuntu0.1 |
| Ubuntu:22.04:LTS | libsepol | 0 | 3.3-1 |
| Ubuntu:Pro:16.04:LTS | libsepol | 0 | 2.4-2ubuntu0.1~esm1 |
Related vulnerabilities
- CVE-2026-119338 Tesseract is an open source OCR engine. CWE-416
- CVE-2026-119332 Ladybird is a truly independent web browser. CWE-416
- CVE-2026-119116 A use-after-free and double-free issue in the SetClient command handler of the… CWE-416
- CVE-2026-119378 SQLite before 3.54.0 contains a use-after-free vulnerability in the R-Tree extension that… CWE-416
- CVE-2026-119372 SQLite before 3.54.0 built with FTS3/FTS4 and SQLITE_ENABLE_FTS3_PARENTHESIS contains a… CWE-416
- CVE-2026-65586 Software installed and run as a non-privileged user may conduct improper GPU system calls… CWE-416
- CVE-2026-15466 Software installed and run as a non-privileged user may conduct improper GPU system calls… CWE-416
- CVE-2026-76031 Use after free in Input in Google Chrome prior to 156.0.8078.79 allowed a remote attacker… CWE-416