Allow mach-lookup to SystemConfiguration.configd in Seatbelt profile#129
Open
olearydj wants to merge 1 commit intoanthropic-experimental:mainfrom
Open
Allow mach-lookup to SystemConfiguration.configd in Seatbelt profile#129olearydj wants to merge 1 commit intoanthropic-experimental:mainfrom
olearydj wants to merge 1 commit intoanthropic-experimental:mainfrom
Conversation
Tools that use macOS SystemConfiguration APIs (e.g. uv, the Python package manager) panic inside the sandbox because SCDynamicStoreCreate() returns NULL when mach IPC to configd is blocked. This is read-only access to system network configuration (DNS, proxies, interfaces) and is consistent with the existing network access the sandbox already grants via the proxy layer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
com.apple.SystemConfiguration.configdto the macOS Seatbelt mach-lookup allowlist so that tools usingSCDynamicStoreCreate()(e.g.uv, the Python package manager) don't panic inside the sandbox.Problem
uvuses thesystem-configurationRust crate, which callsSCDynamicStoreCreate()during Tokio runtime initialization to detect network proxy settings. The current Seatbelt profile blocks mach IPC toconfigdvia the deny-default policy. The crate panics on the resulting NULL instead of handling it gracefully:This affects any tool that uses the macOS SystemConfiguration framework inside the sandbox.
uvis the most common case for Claude Code users running Python workflows.Reproduction
Minimal Seatbelt profile with deny-default mach-lookup matching the current allowlist:
Security Considerations
Reviewers should be aware that
SCDynamicStoreis not purely read-only. The API supports read, write, and notification operations on the system configuration dynamic store.What this grants access to
Read access to:
Write surface:
SCDynamicStoreAPI supportsset,add, andremoveoperationsMitigating factors
opendirectoryd.libinfoexposes user/group info,opendirectoryd.membershipexposes group membership)trustd.agentRelated CVE
CVE-2025-43413 (patched by Apple, June 2024) addressed network information leakage through sandbox gaps in system configuration APIs. Apple considered this attack surface significant enough to tighten sandbox profiles in response.
Context
uv)system-configurationRust crate should handleSCDynamicStoreCreate()returning NULL gracefully instead of panicking. A separate upstream issue will be filed againstuvfor that.Test plan
com.apple.SystemConfiguration.configduv runsucceeds inside sandbox with fix applieduv runpanics inside sandbox without fix (confirmed with hardcoded profiles)🤖 Generated with Claude Code