# CVE-2023-43636: Rootfs Not Protected

> Attackers can modify the root filesystem to gain full control and access encrypted vault data without triggering measured boot checks.

- **Severity:** High 8.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Sep 2023
- **Updated:** 24 Sep 2024
- **Also known as:** GHSA-5h7v-g49c-h887, GO-2026-4435

## What is CVE-2023-43636?

CVE-2023-43636 is a high-severity vulnerability in EVE OS, published on 20 Sep 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In EVE OS, the “measured boot” mechanism prevents a compromised device from accessing
the encrypted data located in the vault.

As per the “measured boot” design, the PCR values calculated at different stages of the boot
process will change if any of their respective parts are changed.

This includes, among other things, the configuration of the bios, grub, the kernel cmdline,
initrd, and more.

However, this mechanism does not validate the entire rootfs, so an attacker can edit the
filesystem and gain control over the system.

As the default filesystem used by EVE OS is squashfs, this is somewhat harder than an ext4,
which is easily changeable.

This will not stop an attacker, as an attacker can repackage the squashfs with their changes
in it and replace the partition altogether.

This can also be done directly on the device, as the “003-storage-init” container contains the
“mksquashfs” and “unsquashfs” binaries (with the corresponding libs).

An attacker can gain full control over the device without changing the PCR values, thus not
triggering the “measured boot” mechanism, and having full access to the vault.

Note:

This issue was partially fixed in these commits (after disclosure to Zededa), where the config
partition measurement was added to PCR13:

• aa3501d6c57206ced222c33aea15a9169d629141

• 5fef4d92e75838cc78010edaed5247dfbdae1889.

This issue was made viable in version 9.0.0 when the calculation was moved to PCR14 but it was not included in the measured boot.

Weakness: CWE-345 (Insufficient Verification of Data Authenticity)

## Which versions are affected by CVE-2023-43636?

3 open source packages ship an affected version, including github.com/lf-edge/eve/pkg/grub and github.com/lf-edge/eve. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/lf-edge/eve/pkg/grub` | Go | All versions | 0.0.0-20220708121648-5fef4d92e758 |
| `github.com/lf-edge/eve/pkg/grub` | Go | All versions | 0.0.0-20220708121648-5fef4d92e758 |
| `github.com/lf-edge/eve` | Go | All versions | 0.0.0-20220708121648-5fef4d92e758 |

Products: Linuxfoundation Edge Virtualization Engine.

## How do I fix CVE-2023-43636?

Upgrade github.com/lf-edge/eve/pkg/grub to 0.0.0-20220708121648-5fef4d92e758 or later.

## Is CVE-2023-43636 being exploited?

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

## Other vulnerabilities in EVE OS

- [CVE-2023-43632](https://insights.sbomify.com/CVE-2023-43632/): Freely Allocate Buffer on The Stack With Data From Socket (critical 9.0)
- [CVE-2023-43631](https://insights.sbomify.com/CVE-2023-43631/): SSH as Root Unlockable Without Triggering Measured Boot (high 8.8)
- [CVE-2023-43630](https://insights.sbomify.com/CVE-2023-43630/): Config Partition Not Measured From 2 Fronts (high 8.8)
- [CVE-2023-43635](https://insights.sbomify.com/CVE-2023-43635/): Vault Key Sealed With SHA1 PCRs (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-43636 and fix it if it is affected.

What it is: CVE-2023-43636 is a high-severity vulnerability in EVE OS, published on 20 Sep 2023. 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-2023-43636 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/lf-edge/eve/pkg/grub (Go): affected all versions; fixed in 0.0.0-20220708121648-5fef4d92e758
- github.com/lf-edge/eve/pkg/grub (Go): affected all versions; fixed in 0.0.0-20220708121648-5fef4d92e758
- github.com/lf-edge/eve (Go): affected all versions; fixed in 0.0.0-20220708121648-5fef4d92e758

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-2023-43636/ (Markdown: https://insights.sbomify.com/CVE-2023-43636/index.md)
```

## Sources

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

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