Skip to content

add ID validation to daemon service#1735

Open
0xf00sec wants to merge 1 commit into
apple:mainfrom
0xf00sec:patch/id-check
Open

add ID validation to daemon service#1735
0xf00sec wants to merge 1 commit into
apple:mainfrom
0xf00sec:patch/id-check

Conversation

@0xf00sec

Copy link
Copy Markdown

The CLI validates container IDs via Utility.validEntityName before sending XPC requests, but the daemon never checked the ID itself. Any process talking directly to com.apple.container.apiserver could pass a path-traversal string (../../tmp/foo) as a container ID, causing the daemon to create, measure, or export bundles outside of containerRoot.

I've Added Utility.validEntityName checks in ContainersService at the entry point of create, containerDiskUsage, and exportRootfs -- the three functions that build filesystem paths from the container ID. The daemon now enforces the same naming rules as the CLI regardless of how the XPC service is reached.

@jglogan jglogan requested a review from realrajaryan June 15, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants