# CVE-2021-36085: libsepol: The libsepol library provides an API for the manipulation of SELinux binary policies

CVE-2021-36085 is fixed in 9 products on 1 platform, first by libsepol1 2.7-1ubuntu0.1, released June 30, 2021. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2021-36085
- Priority: Routine
- CVSS: 3.3 (Moderate)
- EPSS: 0.0045
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jun 30, 2021

## Description

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 Red Hat Enterprise Linux 8.5 Release Notes linked from the References section.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libsepol RHEL 8 | 0:2.9-3.el8 | [RHSA-2021:4513](https://patchblox.com/security/data/fix/linux/rhsa-2021-4513.md) | Nov 9, 2021 |
| Linux | libsepol almalinux 8 | 2.9-3.el8 | [ALSA-2021:4513](https://patchblox.com/security/data/fix/linux/alsa-2021-4513.md) | Nov 9, 2021 |
| Linux | libsepol amzn 2023 | 3.4-3.amzn2023.0.3 | [ALAS2023-2023-017](https://patchblox.com/security/data/fix/linux/alas2023-2023-017.md) | Feb 17, 2023 |
| Linux | libsepol ol 8 | 0:2.9-3.el8 | [ELSA-2021-4513](https://patchblox.com/security/data/fix/linux/elsa-2021-4513.md) | Nov 16, 2021 |
| Linux | libsepol rocky 8 | 0:2.9-3.el8 | [RLSA-2021:4513](https://patchblox.com/security/data/fix/linux/rlsa-2021-4513.md) | Nov 9, 2021 |
| Linux | libsepol-debuginfo amzn 2023 | 3.4-3.amzn2023.0.3 | [ALAS2023-2023-017](https://patchblox.com/security/data/fix/linux/alas2023-2023-017.md) | Feb 17, 2023 |
| Linux | libsepol-debugsource amzn 2023 | 3.4-3.amzn2023.0.3 | [ALAS2023-2023-017](https://patchblox.com/security/data/fix/linux/alas2023-2023-017.md) | Feb 17, 2023 |
| Linux | libsepol-devel RHEL 8 | 0:2.9-3.el8 | [RHSA-2021:4513](https://patchblox.com/security/data/fix/linux/rhsa-2021-4513.md) | Nov 9, 2021 |
| Linux | libsepol-devel almalinux 8 | 2.9-3.el8 | [ALSA-2021:4513](https://patchblox.com/security/data/fix/linux/alsa-2021-4513.md) | Nov 9, 2021 |
| Linux | libsepol-devel amzn 2023 | 3.4-3.amzn2023.0.3 | [ALAS2023-2023-017](https://patchblox.com/security/data/fix/linux/alas2023-2023-017.md) | Feb 17, 2023 |
| Linux | libsepol-devel ol 8 | 0:2.9-3.el8 | [ELSA-2021-4513](https://patchblox.com/security/data/fix/linux/elsa-2021-4513.md) | Nov 16, 2021 |
| Linux | libsepol-static RHEL 8 | 0:2.9-3.el8 | [RHSA-2021:4513](https://patchblox.com/security/data/fix/linux/rhsa-2021-4513.md) | Nov 9, 2021 |
| Linux | libsepol-static almalinux 8 | 2.9-3.el8 | [ALSA-2021:4513](https://patchblox.com/security/data/fix/linux/alsa-2021-4513.md) | Nov 9, 2021 |
| Linux | libsepol-static amzn 2023 | 3.4-3.amzn2023.0.3 | [ALAS2023-2023-017](https://patchblox.com/security/data/fix/linux/alas2023-2023-017.md) | Feb 17, 2023 |
| Linux | libsepol-static ol 8 | 0:2.9-3.el8 | [ELSA-2021-4513](https://patchblox.com/security/data/fix/linux/elsa-2021-4513.md) | Nov 16, 2021 |
| Linux | libsepol-utils amzn 2023 | 3.4-3.amzn2023.0.3 | [ALAS2023-2023-017](https://patchblox.com/security/data/fix/linux/alas2023-2023-017.md) | Feb 17, 2023 |
| Linux | libsepol-utils-debuginfo amzn 2023 | 3.4-3.amzn2023.0.3 | [ALAS2023-2023-017](https://patchblox.com/security/data/fix/linux/alas2023-2023-017.md) | Feb 17, 2023 |
| Linux | libsepol1 Ubuntu 18.04.6 LTS (bionic) | 2.7-1ubuntu0.1 | [libsepol1 2.7-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libsepol1-2.7-1ubuntu0.1.md) | Jun 30, 2021 |
| Linux | libsepol1 Ubuntu 20.04 LTS (focal) | 3.0-1ubuntu0.1 | [libsepol1 3.0-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-libsepol1-3.0-1ubuntu0.1.md) | Jun 30, 2021 |
| Linux | sepol-utils Ubuntu 18.04.6 LTS (bionic) | 2.7-1ubuntu0.1 | [sepol-utils 2.7-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-sepol-utils-2.7-1ubuntu0.1.md) | Jun 30, 2021 |
| Linux | sepol-utils Ubuntu 20.04 LTS (focal) | 3.0-1ubuntu0.1 | [sepol-utils 3.0-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-sepol-utils-3.0-1ubuntu0.1.md) | Jun 30, 2021 |

---

Data as of 2026-11-08T00:53:09Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
