Browser image admission trusts digests in the installed image directory

Aperta
#534 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend, security

Direzione di ricerca

Start with elastos/crates/elastos-server/src/setup/browser_vm_image.rs, especially verify_installed, and read docs/BROWSER_VM_TARGET.md:113 plus the linked release disposition. Trace where signed component or release data is available and how the verified image is opened before designing a safe admission flow. Done means signed digests reject rewritten image files, Mac and Linux regression coverage proves rejection, launch rechecks file identity, and unsigned Source-Home rows remain clearly marked.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

The Browser VM image (rootfs, kernel, initrd) is admitted by comparing the bytes the Runtime hashes against digests in browser-vm-rootfs-manifest.json, a receipt file that sits in the installed image directory next to the image (elastos/crates/elastos-server/src/setup/browser_vm_image.rs, verify_installed). The receipt's own check (.elastos-image-manifest-sha256) and the archive check (.elastos-artifact-sha256 against the component row's archive checksum) are also files in that directory. Nothing in that chain is signed or held outside the Home user's write access, so a process running as the Home user can replace the image bytes and rewrite all four files consistently, and admission accepts the chosen bytes. docs/BROWSER_VM_TARGET.md:113 says adjacent files provide no verification authority.

This is on develop today (Mac VZ since 2.0.0, and Linux ARM on #531). Found by a Claude review of #531 on 5 Nov while checking Codex Root's HOLD (the separate persistent verified-identity record, removed in #531).

Release disposition — 2.0.1, 5 November 2026

No hold for this finding alone under the current host-account-write precondition; reasoning, limits and change conditions. The issue remains open for signed expected digests and regression proof. Privileged helper execution and installed Browser acceptance keep their separate gates.

Done means

  • The per-file digests of rootfs, kernel and initrd come from signed release data (the signed component row or release head), not from files in the installed image directory; admission refuses when the hashed bytes differ from the signed digests.
  • A regression on Mac and Linux: replace the rootfs bytes and rewrite the receipt and both adjacent hash files consistently; admission refuses.
  • The file that was verified is the file the VM opens: identity re-checked (dev, inode, size, mtime, ctime) immediately before the overlay or copy is created, or the verified descriptor is used; a change in between refuses the launch.
  • Source-Home setups still work (their unsigned local rows are marked as such and never shown as a signed release).

Related: #406 (privileged setup bound to signed admission), #90, #531.

Lingua principale
Rust
Stelle
6
Fork
2
Merge medio
1g 3h
PR unite (30g)
42

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di elastos/elastos-runtime

Tutte le issue di elastos/elastos-runtime

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.