# CVE-2021-22566: Incorrect mapping of Executable bits in Fuchsia Kernel

> Incorrect MMU flag mapping allows bypassing kernel and user-mode executability restrictions, facilitating privilege escalation in Fuchsia OS.

- **Severity:** Medium 5.1 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 18 Jan 2022
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-q77g-rg5g-rf78

## What is CVE-2021-22566?

CVE-2021-22566 is a medium-severity vulnerability in Google LLC Fuchsia, published on 18 Jan 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

An incorrect setting of UXN bits within mmu_flags_to_s1_pte_attr lead to privileged executable pages being mapped as executable from an unprivileged context. This can be leveraged by an attacker to bypass executability restrictions of kernel-mode pages from user-mode. An incorrect setting of PXN bits within mmu_flags_to_s1_pte_attr lead to unprivileged executable pages being mapped as executable from a privileged context. This can be leveraged by an attacker to bypass executability restrictions of user-mode pages from kernel-mode. Typically this allows a potential attacker to circumvent a mitigation, making exploitation of potential kernel-mode vulnerabilities easier. We recommend updating kernel beyond commit 7d731b4e9599088ac3073956933559da7bca6a00 and rebuilding.

Weakness: CWE-732 (Incorrect Permission Assignment for Critical Resource), CWE-275

## Which versions are affected by CVE-2021-22566?

It affects 1 product.


Products: Google Fuchsia.

## How do I fix CVE-2021-22566?

No fix has been published for CVE-2021-22566 yet. Limit exposure of the affected software until one is available.

## Is CVE-2021-22566 being exploited?

There is no known exploitation of CVE-2021-22566 in the wild and no public exploit code.

## Other vulnerabilities in Google LLC Fuchsia

- [CVE-2022-0247](https://insights.sbomify.com/CVE-2022-0247/): Write access to VMO data through copy-on-write in Fuchsia (high 7.5)
- [CVE-2024-10604](https://insights.sbomify.com/CVE-2024-10604/): Identifiable Header Values In Fuchsia Leading To Tracking of The User (medium 6.9)
- [CVE-2021-22556](https://insights.sbomify.com/CVE-2021-22556/): Integer Overflow in Fuchsia Kernel (medium 5.3)
- [CVE-2022-0882](https://insights.sbomify.com/CVE-2022-0882/): Illegal access to Kernel log in Fuchsia (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-22566 and fix it if it is affected.

What it is: CVE-2021-22566 is a medium-severity vulnerability in Google LLC Fuchsia, published on 18 Jan 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-22566 in the wild and no public exploit code.

Affected product: Google LLC Fuchsia. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-22566/ (Markdown: https://insights.sbomify.com/CVE-2021-22566/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-22566
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-22566
- OSV: https://osv.dev/vulnerability/CVE-2021-22566

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-22566/
Summaries are generated and may contain mistakes; the official description above is the record.
