Skip to content

[release-1.0] Cherry-pick #3487: Unknown Linux capability names in an ActorTemplate are rejected at admission - #3514

Merged
Dmitry Berkovich (dberkov) merged 1 commit into
agent-substrate:release-1.0from
BenTheElder:cherry-pick-3487-release-1.0
Oct 31, 2026
Merged

Dmitry Berkovich (dberkov) merged 1 commit into
agent-substrate:release-1.0from
BenTheElder:cherry-pick-3487-release-1.0

Conversation

@BenTheElder

Copy link
Copy Markdown
Collaborator

Cherry-pick of #3487 onto release-1.0 (git cherry-pick -x of the squash commit), it applied cleanly with no changes.

Capability names in add and drop are checked against the 41 Linux capabilities at admission, and atelet runs the same check on Run and Restore. Before, a typo in add failed at actor start and a typo in drop was ignored. Part of #3226.

AI use: AI-assisted. Clean pick.

This carries the same breaking change as #3487: a template with an unknown name in drop is now rejected, check drop lists for typos. Unknown names in add already failed at actor start.

  • Tests pass
  • Docs updated

…ected at admission (agent-substrate#3487)

Part of agent-substrate#3226.

We only checked the shape of capability names, so a typo passed
admission. In `add` it failed at actor start, and on microVM kata-agent
panics converting it
([trans.rs](https://github.com/kata-containers/kata-containers/blob/03cf2ec06a5d302f23af811744f6bcea49988bfb/src/libs/protocols/src/trans.rs#L40-L52)).
In `drop` it was ignored, so `drop: [NET_BIND_SERVIC]` kept
`NET_BIND_SERVICE`.

Names are now checked against the 41 Linux capabilities, the same set
runsc
([specutils.go](https://github.com/google/gvisor/blob/760b80785dc53311d4c87bd2de167525a99709c1/runsc/specutils/specutils.go#L510-L552))
and kata's oci-spec
([capability.rs](https://github.com/youki-dev/oci-spec-rs/blob/1cc1afb0e9a68403d8fb5bde1a3d05db968f41d3/src/runtime/capability.rs#L26-L520))
accept. atelet runs the same check on Run and Restore.

AI use: AI-assisted, I reviewed it.

Breaking change: a template with an unknown name in `drop` is now
rejected, check `drop` lists for typos. Unknown names in `add` already
failed at actor start.

- [x] Tests pass
- [x] Docs updated

---------

Signed-off-by: Benjamin Elder <[email protected]>
(cherry picked from commit 75a061c)
Signed-off-by: Benjamin Elder <[email protected]>
@dberkov
Dmitry Berkovich (dberkov) merged commit 7b5023d into agent-substrate:release-1.0 Oct 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api User-facing API changes area/gvisor area/microVM area/node breaking-change PRs with breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants