Skip to content

Commit 7bfb764

Browse files
ppennaCopilot
andcommitted
doc: say that caller ownership fails while a group may be unmapped
The run guide's file-ownership section says that, in a user namespace that does not map every group, OpenVMM counts a group of its own that reads as the overflow GID as another group, even for a caller with that GID, so that an OpenVMM with CAP_SETGID would drop it. The pinned OpenVMM no longer drops such a group (#1606): getgroups reports each unmapped group as the overflow GID, 65534 by default, and setgroups accepts only groups that the namespace maps, so OpenVMM could never regain it. It can neither keep such a group, which may be any group, nor drop it, so it now fails with EPERM each operation that runs as its caller while one of its groups reads as the overflow GID, even with CAP_SETUID and CAP_SETGID. Say so, with an example of such a namespace and what to do there. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ee244ce commit 7bfb764

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

‎doc/run.md‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,14 +1570,16 @@ OpenVMM's user belongs to no other group; every other operation fails with
15701570
`EPERM`. Hosts commonly grant access to `/dev/kvm` or `/dev/mshv` through such
15711571
a group, so `caller` usually needs both capabilities. In a user namespace that
15721572
does not map every group, Linux reports each unmapped group as its overflow
1573-
GID, 65534 by default, which is also the default workload's group, so there
1574-
OpenVMM counts a group of its own that reads as the overflow GID as another
1575-
group, even for a caller with that GID. A managed sandbox's guest agent maps
1576-
the shares before any workload runs, as guest root, which `caller` squashes to
1577-
the owner of the host directory, so a managed sandbox whose OpenVMM cannot
1578-
assume that identity fails to start. Grant OpenVMM no other capabilities:
1579-
`CAP_SETUID` lets it assume any host identity, which `caller` mode confines to
1580-
its export.
1573+
GID, 65534 by default, which is also the default workload's group. OpenVMM can
1574+
neither keep such a group nor regain it after dropping it, so there every
1575+
operation that runs as its caller fails with `EPERM`, even with both
1576+
capabilities, while one of OpenVMM's groups reads as the overflow GID, as in a
1577+
rootless container that keeps the host user's groups; start OpenVMM there
1578+
without such groups. A managed sandbox's guest agent maps the shares before
1579+
any workload runs, as guest root, which `caller` squashes to the owner of the
1580+
host directory, so a managed sandbox whose OpenVMM cannot assume that identity
1581+
fails to start. Grant OpenVMM no other capabilities: `CAP_SETUID` lets it
1582+
assume any host identity, which `caller` mode confines to its export.
15811583

15821584
The guest kernel reports each caller's identity, and guest root may assume any
15831585
identity inside the guest, so guest root and a compromised guest kernel can act

0 commit comments

Comments
 (0)