Skip to content

deny launchservicesd mach-lookup to avoid escape#715

Merged
ericcurtin merged 1 commit intomainfrom
sandbox-fix
Feb 27, 2026
Merged

deny launchservicesd mach-lookup to avoid escape#715
ericcurtin merged 1 commit intomainfrom
sandbox-fix

Conversation

@ericcurtin
Copy link
Contributor

The llama-server sandbox profile allowed mach IPC communication with launchservicesd, which open(1) uses to ask launchd to spawn processes. This bypassed job-creation restrictions since launchd — not the sandboxed process — is the actual spawning parent.

Deny mach-lookup for com.apple.launchservicesd and its CoreServices alias to close the escape path while leaving other mach operations intact.

The llama-server sandbox profile allowed mach IPC communication with
launchservicesd, which open(1) uses to ask launchd to spawn processes.
This bypassed job-creation restrictions since launchd — not the sandboxed
process — is the actual spawning parent.

Deny mach-lookup for com.apple.launchservicesd and its CoreServices alias
to close the escape path while leaving other mach operations intact.

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a security hardening measure for the macOS sandbox profile used by llama-server. The change adds a rule to deny mach-lookup for com.apple.launchservicesd and its alias. This is intended to close a sandbox escape vulnerability where a sandboxed process could bypass job-creation restrictions. The change is consistent with the description and appears to correctly address the specified vulnerability.

@ericcurtin ericcurtin merged commit 9803886 into main Feb 27, 2026
11 checks passed
@ericcurtin ericcurtin deleted the sandbox-fix branch February 27, 2026 14:57
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