Skip to content

hardening: fix submounts of read-only image volumes being writable - #2944

Merged
Zoe Zhao (zoez7) merged 6 commits into
agent-substrate:mainfrom
BenTheElder:remount-ro-recursive
Oct 20, 2026
Merged

Zoe Zhao (zoez7) merged 6 commits into
agent-substrate:mainfrom
BenTheElder:remount-ro-recursive

Conversation

@BenTheElder

Copy link
Copy Markdown
Collaborator

Image volumes were only read-only at the top mount. Mounts nested under them, or mounted under the source later, stayed writable. Current image volumes have no submounts, so this is hardening.

Fixes #2933

  • micro-VM: the share binds for image and system-info volumes are now read-only and private all the way down
  • imagecache: the single-layer image volume bind gets the same treatment. gVisor binds image volumes non-recursively, so gVisor actors never saw submounts, and this is hygiene

The new root-gated test cases each fail without their fix. I ran them locally as root.

AI use: AI-assisted, I reviewed and tested it.

  • Tests pass
  • Docs updated

mount_setattr checks privilege before the path, so unprivileged it gets EPERM, not ENOENT. the statfs error it covered is gone
@HavenXia
Haven Xia (HavenXia) added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
@zoez7
Zoe Zhao (zoez7) added this pull request to the merge queue Oct 20, 2026
Merged via the queue into agent-substrate:main with commit f302cf0 Oct 20, 2026
15 checks passed
@BenTheElder
Benjamin Elder (BenTheElder) deleted the remount-ro-recursive branch October 20, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/node area/security Security related issue/pr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Low] RemountReadOnly is non-recursive, so submounts under a recursively bound image volume stay writable

3 participants