I am asking which supported public macOS interface can meet the requirements below. This is a design/supportability question; I do not have a focused Xcode reproducer.
Recorded host: macOS 26.6.2 (build 25G83), Apple silicon (arm64).
Workload: an unchanged, third-party Flutter/Dart command-line toolchain and its process tree. This includes exec descendants and native code called directly through FFI, including SQLite loaded through FFI.
Question: Is there a currently supported public interface and exact policy, or a documented supported composition of public interfaces, that can kernel-enforce requested-address bind/connect restrictions on that tree with all of the following properties?
Numeric 127.0.0.1 TCP ephemeral bind/listen/connect/echo must work.
The actual bind(AF_INET, 0.0.0.0:0) call must itself fail immediately, at the call, with EPERM or EACCES.
The actual connect(AF_INET, 192.0.2.1:9) call must itself fail immediately, at the call, with EPERM or EACCES.
The restriction must apply across exec children, native/direct calls (not only libc or framework wrappers), inherited file descriptors and SQLite FFI.
The tree's necessary filesystem read, write and executable/library-load set must be specifiable and bounded. Protected originals and SDK, Git and cache identities must stay unmodified, credentials and sealed evidence must stay protected, and no broad new permissions are granted.
Signing, entitlements, privilege, installation/activation, user or admin approval, inheritance/FD scope and host applicability must be specified authoritatively.
These do not meet the requirements: flow or packet drop, timeout, connection refused, no route, a missing interface, user-space interception or wrappers, unsupported or private interfaces, reduced SIP, or an operation that never ran.
Specific points we would like confirmed:
a. App Sandbox. The documented com.apple.security.network.client and com.apple.security.network.server entitlements are Boolean and have no per-address selector. Is there any supported way to allow listening on 127.0.0.1 while making a wildcard 0.0.0.0 bind fail with EPERM/EACCES? Can an existing externally built toolchain and all of its descendants be confined this way? Apple's helper guidance re-signs embedded tools with only com.apple.security.app-sandbox and com.apple.security.inherit.
b. Network Extension. Can a content filter (NEFilterDataProvider), packet filter provider, transparent proxy or another provider type make the original bind() or connect() syscall itself return EPERM/EACCES, rather than dropping the flow later? If a new-flow drop verdict makes connect() fail, is the resulting errno documented and guaranteed?
c. Endpoint Security. We understand the AUTH_UIPC_BIND/AUTH_UIPC_CONNECT events cover only UNIX-domain sockets. Is there any supported Endpoint Security event that authorizes IPv4 TCP bind/connect?
d. Custom sandbox profiles. Is a custom sandbox profile (SBPL) applied through sandbox-exec or sandbox_init a supported interface for third-party products on this macOS version?
e. Delegated paths (an additional question, separate from 1–6): Does any candidate interface cover network activity performed for the tree by system daemons or local relays?
If a qualifying interface exists, please name the exact public interface and policy/configuration, the supported macOS versions, and the requirements under point 6. Please also confirm that the two denied calls are guaranteed to return EPERM/EACCES at the call.
If none exists, please say so, and say which numbered property has no supported public interface. We will record that as "no supported public interface", not as a statement that the behaviour is technically impossible. Any closest supported alternative you mention will be recorded as information only. It will not be treated as meeting properties 1–6.
No logs, source code, credentials or internal evidence are attached.
0
0
53