Browser image admission trusts digests in the installed image directory

オープン
#534 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
backend, security

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
6
フォーク
2
平均マージ
1日 3時間
マージ済み PR(30日)
42

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

elastos/elastos-runtime のほかの issue

elastos/elastos-runtime の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。