CVE-2021-36087
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called...
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called indirectly from cil_check_neverallow). This occurs because there is sometimes a lack of checks for invalid statements in an optional block.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Exploit likelihood
What each source reports
NVD Score used
3.3
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called indirectly from cil_check_neverallow). This occurs because there is sometimes a lack of checks for invalid statements in an optional block.
- Record
CVE-2021-36087- CVSS 3.1
- 3.3 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L - CVSS 2.0
- 2.1 Low
AV:L/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-125
- Updated
- 2026-11-02
CVE List No score
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called indirectly from cil_check_neverallow). This occurs because there is sometimes a lack of checks for invalid statements in an optional block.
- Record
CVE-2021-36087- Updated
- 2026-11-02
EUVDEUVD-2021-22720 No score
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called indirectly from cil_check_neverallow). This occurs because there is sometimes a lack of checks for invalid statements in an optional block.
- Record
EUVD-2021-22720- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-xjc2-37xp-26m5
3.3
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called...
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called indirectly from cil_check_neverallow). NOTE: bad0a746e9f4cf260dedba5828d9645d50176aac is cited in the OSV "fixed" field but does not have a code change.
- Record
GHSA-xjc2-37xp-26m5- CVSS 3.1
- 3.3 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-125
- Updated
- 2026-11-02
OSV
3.3
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called indirectly from cil_check_neverallow). This occurs because there is sometimes a lack of checks for invalid statements in an optional block.
- Record
CVE-2021-36087- CVSS 3.1
- 3.3 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-36087
3.3
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called indirectly from cil_check_neverallow). This occurs because there is sometimes a lack of checks for invalid statements in an optional block.
- Record
DEBIAN-CVE-2021-36087- CVSS 3.1
- 3.3 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
Show 6 moreShow less
OSVRHSA-2021:4513
3.3
Red Hat Security Advisory: libsepol security update
- Record
RHSA-2021:4513- CVSS 3.1
- 3.3 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVRLSA-2021:4513
3.3
Moderate: libsepol security update
The libsepol library provides an API for the manipulation of SELinux binary policies. It is used by checkpolicy (the policy compiler) and similar tools, as well as by programs like load_policy that need to perform specific transformations on binary policies (for example, customizing policy boolean settings).
Security Fix(es):
-
libsepol: use-after-free in __cil_verify_classperms() (CVE-2021-36084)
-
libsepol: use-after-free in __cil_verify_classperms() (CVE-2021-36085)
-
libsepol: use-after-free in cil_reset_classpermission() (CVE-2021-36086)
-
libsepol: heap-based buffer overflow in ebitmap_match_any() (CVE-2021-36087)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
Additional Changes:
For detailed information on changes in this release, see the Rocky Linux 8.5 Release Notes linked from the References section.
- Record
RLSA-2021:4513- CVSS 3.1
- 3.3 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-36087
3.3
The CIL compiler in SELinux 3.2 has a heap-based buffer over-read in ebitmap_match_any (called indirectly from cil_check_neverallow). This occurs because there is sometimes a lack of checks for invalid statements in an optional block.
- Record
UBUNTU-CVE-2021-36087- CVSS 3.1
- 3.3 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVALSA-2021:4513 No score
Moderate: libsepol security update
The libsepol library provides an API for the manipulation of SELinux binary policies. It is used by checkpolicy (the policy compiler) and similar tools, as well as by programs like load_policy that need to perform specific transformations on binary policies (for example, customizing policy boolean settings).
Security Fix(es):
-
libsepol: use-after-free in __cil_verify_classperms() (CVE-2021-36084)
-
libsepol: use-after-free in __cil_verify_classperms() (CVE-2021-36085)
-
libsepol: use-after-free in cil_reset_classpermission() (CVE-2021-36086)
-
libsepol: heap-based buffer overflow in ebitmap_match_any() (CVE-2021-36087)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
Additional Changes:
For detailed information on changes in this release, see the AlmaLinux Release Notes linked from the References section.
- Record
ALSA-2021:4513- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10990-1 No score
libsepol-devel-3.2-3.2 on GA media
These are all security issues fixed in the libsepol-devel-3.2-3.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10990-1- Updated
- 2026-11-02
OSVUSN-5391-1 No score
libsepol vulnerabilities
Nicolas Iooss discovered that libsepol incorrectly handled memory when handling policies. An attacker could possibly use this issue to cause a crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-36084)
It was discovered that libsepol incorrectly handled memory when handling policies. An attacker could possibly use this issue to cause a crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-36085)
It was discovered that libsepol incorrectly handled memory when handling policies. An attacker could possibly use this issue to cause a crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affects Ubuntu 18.04 LTS, Ubuntu 20.04 LTS and Ubuntu 21.10. (CVE-2021-36086)
It was discovered that libsepol incorrectly validated certain data, leading to a heap overflow. An attacker could possibly use this issue to cause a crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-36087)
- Record
USN-5391-1- Updated
- 2026-11-02
Affected products
- selinux project selinux
- fedoraproject fedora
- siemens ruggedcom rox mx5000
- siemens ruggedcom rox mx5000re
- siemens ruggedcom rox rx1400
- siemens ruggedcom rox rx1500
- siemens ruggedcom rox rx1501
- siemens ruggedcom rox rx1510
- siemens ruggedcom rox rx1511
- siemens ruggedcom rox rx1512
- siemens ruggedcom rox rx1524
- siemens ruggedcom rox rx1536
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libsepolAlmaLinux:8 From an advisory covering 4 CVEs |
before 2.9-3.el8 | 2.9-3.el8 |
libsepol-develAlmaLinux:8 From an advisory covering 4 CVEs |
before 2.9-3.el8 | 2.9-3.el8 |
libsepol-staticAlmaLinux:8 From an advisory covering 4 CVEs |
before 2.9-3.el8 | 2.9-3.el8 |
libsepolDebian:12 |
before 3.3-1 | 3.3-1 |
libsepolDebian:13 |
before 3.3-1 | 3.3-1 |
libsepolDebian:14 |
before 3.3-1 | 3.3-1 |
libsepolDebian:11 From an advisory covering 4 CVEs |
before 3.1-1+deb11u1, plus listed versions 3.1-1 |
3.1-1+deb11u1 |
libsepolRed Hat:enterprise_linux:8::baseos From an advisory covering 4 CVEs |
before 0:2.9-3.el8 | 0:2.9-3.el8 |
libsepol-debuginfoRed Hat:enterprise_linux:8::baseos From an advisory covering 4 CVEs |
before 0:2.9-3.el8 | 0:2.9-3.el8 |
libsepol-debugsourceRed Hat:enterprise_linux:8::baseos From an advisory covering 4 CVEs |
before 0:2.9-3.el8 | 0:2.9-3.el8 |
Show 11 moreShow less
| Package | Affected | Fixed |
|---|---|---|
libsepol-develRed Hat:enterprise_linux:8::baseos From an advisory covering 4 CVEs |
before 0:2.9-3.el8 | 0:2.9-3.el8 |
libsepol-debuginfoRed Hat:enterprise_linux:8::crb From an advisory covering 4 CVEs |
before 0:2.9-3.el8 | 0:2.9-3.el8 |
libsepol-debugsourceRed Hat:enterprise_linux:8::crb From an advisory covering 4 CVEs |
before 0:2.9-3.el8 | 0:2.9-3.el8 |
libsepol-staticRed Hat:enterprise_linux:8::crb From an advisory covering 4 CVEs |
before 0:2.9-3.el8 | 0:2.9-3.el8 |
libsepolRocky Linux:8 From an advisory covering 4 CVEs |
before 0:2.9-3.el8 | 0:2.9-3.el8 |
libsepolUbuntu:Pro:16.04:LTS |
before 2.4-2ubuntu0.1~esm1, plus listed versions 2.3-22.4-2 |
2.4-2ubuntu0.1~esm1 |
libsepolUbuntu:18.04:LTS |
before 2.7-1ubuntu0.1, plus listed versions 2.7-1 |
2.7-1ubuntu0.1 |
libsepolUbuntu:20.04:LTS |
before 3.0-1ubuntu0.1, plus listed versions 2.9-23.0-1 |
3.0-1ubuntu0.1 |
libsepolUbuntu:Pro:16.04:LTS From an advisory covering 4 CVEs |
before 2.4-2ubuntu0.1~esm1, plus listed versions 2.3-22.4-2 |
2.4-2ubuntu0.1~esm1 |
libsepolUbuntu:18.04:LTS From an advisory covering 4 CVEs |
before 2.7-1ubuntu0.1, plus listed versions 2.7-1 |
2.7-1ubuntu0.1 |
libsepolUbuntu:20.04:LTS From an advisory covering 4 CVEs |
before 3.0-1ubuntu0.1, plus listed versions 2.9-23.0-1 |
3.0-1ubuntu0.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-36087 is a low vulnerability (CVSS 3.3) in Selinux Project Selinux, published July 1, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.47%, the 41st percentile. Fixed in libsepol 3.3-1.
References
github.com/google/oss-fuzz-vulns/blob/main/vulns/selinux/OSV-2021-585.yaml
bugs.chromium.org/p/oss-fuzz/issues/detail?id=32675
lore.kernel.org/selinux/CAEN2sdqJKHvDzPnxS-J8grU8fSf32DDtx=kyh84OsCq_Vm+yaQ%40mail.gmail.com/T
github.com/SELinuxProject/selinux/commit/340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/U7ZYR3PIJ75N6U2IONJWCKZ5L2NKJTGR
security.netapp.com/advisory/ntap-20250207-0004
Show 42 moreShow less
lists.debian.org/debian-lts-announce/2024/10/msg00021.html
cert-portal.siemens.com/productcert/html/ssa-398330.html
cert-portal.siemens.com/productcert/html/ssa-202008.html
nvd.nist.gov/vuln/detail/CVE-2021-36087
github.com/SELinuxProject/selinux/commit/bad0a746e9f4cf260dedba5828d9645d50176aac
lists.fedoraproject.org/archives/list/[email protected]/message/U7ZYR3PIJ75N6U2IONJWCKZ5L2NKJTGR
lore.kernel.org/selinux/CAEN2sdqJKHvDzPnxS-J8grU8fSf32DDtx=kyh84OsCq_Vm+[email protected]/T
github.com/advisories/GHSA-xjc2-37xp-26m5
errata.almalinux.org/8/ALSA-2021-4513.html
vulners.com/cve/CVE-2021-36084
vulners.com/cve/CVE-2021-36085
vulners.com/cve/CVE-2021-36086
vulners.com/cve/CVE-2021-36087
security-tracker.debian.org/tracker/CVE-2021-36087
access.redhat.com/errata/RHSA-2021:4513
access.redhat.com/security/updates/classification
access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.5_release_notes
bugzilla.redhat.com/show_bug.cgi?id=1979662
bugzilla.redhat.com/show_bug.cgi?id=1979664
bugzilla.redhat.com/show_bug.cgi?id=1979666
bugzilla.redhat.com/show_bug.cgi?id=1979668
security.access.redhat.com/data/csaf/v2/advisories/2021/rhsa-2021_4513.json
access.redhat.com/security/cve/CVE-2021-36084
cve.org/CVERecord?id=CVE-2021-36084
nvd.nist.gov/vuln/detail/CVE-2021-36084
access.redhat.com/security/cve/CVE-2021-36085
cve.org/CVERecord?id=CVE-2021-36085
nvd.nist.gov/vuln/detail/CVE-2021-36085
access.redhat.com/security/cve/CVE-2021-36086
cve.org/CVERecord?id=CVE-2021-36086
nvd.nist.gov/vuln/detail/CVE-2021-36086
access.redhat.com/security/cve/CVE-2021-36087
cve.org/CVERecord?id=CVE-2021-36087
errata.rockylinux.org/RLSA-2021:4513
ubuntu.com/security/CVE-2021-36087
ubuntu.com/security/notices/USN-5391-1
ubuntu.com/security/CVE-2021-36084
ubuntu.com/security/CVE-2021-36085
ubuntu.com/security/CVE-2021-36086
suse.com/security/cve/CVE-2021-36085
suse.com/security/cve/CVE-2021-36086
suse.com/security/cve/CVE-2021-36087