CVE-2021-36087
NixOS vulnerability analysis and mitigation

Overview

The CIL compiler in SELinux 3.2 contains a heap-based buffer over-read vulnerability in the ebitmapmatchany function, which is called indirectly from cilcheckneverallow. This vulnerability occurs due to insufficient validation of invalid statements within optional blocks (Debian Tracker, Ubuntu Security).

Technical details

The vulnerability stems from a situation where nodes could be copied from an optional block to somewhere outside, even though the optional block could be disabled later. When optional blocks are disabled, the AST (Abstract Syntax Tree) is reset and resolution restarts at the point of resolving macro calls. The issue specifically manifests as a heap-based buffer over-read in the ebitmapmatchany function when processing invalid statements in optional blocks (OSS Fuzz). The vulnerability has been assigned a CVSS score of 3.3 (Low), with local attack vector, low attack complexity, and low privileges required (Ubuntu Security).

Impact

The vulnerability can lead to a heap-based buffer over-read condition, potentially causing application crashes or information disclosure. The impact is considered low severity as it requires local access and only affects the availability of the system without compromising confidentiality or integrity (Ubuntu Security).

Mitigation and workarounds

The vulnerability was fixed in SELinux commit 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521, which implements checks for statements not allowed in optional blocks. The fix prevents tunable declarations, in-statements, blocks, blockabstracts, and macro definitions from being placed within optional blocks during both building and resolving of the AST (SELinux Commit).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-48606HIGH7.8
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48639HIGH7.3
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48625HIGH7
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48608MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48569MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management