Skip to content

net: block legacy socket ioctls and virtualize /proc/net#23

Merged
congwang-mk merged 2 commits intomainfrom
net-isolation
Apr 26, 2026
Merged

net: block legacy socket ioctls and virtualize /proc/net#23
congwang-mk merged 2 commits intomainfrom
net-isolation

Conversation

@congwang-mk
Copy link
Copy Markdown
Contributor

Summary

  • Block SIOCGIF*/SIOCETHTOOL ioctls and hide /sys/class/net so sandboxed code can't enumerate or query host interfaces.
  • Virtualize /proc/net/dev and /proc/net/if_inet6 to expose only the loopback interface.

Test plan

  • cargo test -p sandlock-core (includes new tests/integration/test_netlink_virt.rs)
  • Manual: run a sandboxed process and confirm ip link, ifconfig, cat /proc/net/dev, and cat /proc/net/if_inet6 only show lo
  • Manual: confirm ls /sys/class/net is blocked

🤖 Generated with Claude Code

Signed-off-by: Cong Wang <cwang@multikernel.io>
Signed-off-by: Cong Wang <cwang@multikernel.io>
@congwang-mk congwang-mk merged commit 8987af8 into main Apr 26, 2026
8 checks passed
@congwang-mk congwang-mk deleted the net-isolation branch April 26, 2026 05:39
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.

1 participant