Skip to content

Fix bwrap loopback permission error in secure mode#21

Closed
nbeerbower wants to merge 2 commits into
mainfrom
claude/fix-bwrap-loopback-error-5sJr0
Closed

Fix bwrap loopback permission error in secure mode#21
nbeerbower wants to merge 2 commits into
mainfrom
claude/fix-bwrap-loopback-error-5sJr0

Conversation

@nbeerbower

Copy link
Copy Markdown
Contributor

Setting up loopback in a new network namespace requires CAP_NET_ADMIN, which unprivileged users don't have. This caused the error: "bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted"

Network restrictions are still enforced by hemlock's --sandbox flag. All other isolation (user, PID, filesystem, IPC) remains intact.

Setting up loopback in a new network namespace requires CAP_NET_ADMIN,
which unprivileged users don't have. This caused the error:
"bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted"

Network restrictions are still enforced by hemlock's --sandbox flag.
All other isolation (user, PID, filesystem, IPC) remains intact.
When user namespaces aren't available (common on Ubuntu 24.04+ due to
AppArmor restrictions), Grove now falls back to basic sandbox mode with
a helpful message showing how to enable them, instead of failing with
"bwrap: setting up uid map: Permission denied".
@nbeerbower nbeerbower closed this Jan 14, 2026
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