Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.4.0] Allow ICMP sockets inside a sandbox. #23433

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/tools/linux-sandbox-pid1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,14 @@ static void SetupNetworking() {
DIE("close");
}
}

if (opt.create_netns != NO_NETNS && opt.fake_root) {
// Allow IPPROTO_ICMP sockets when already allowed outside of the namespace.
// In a namespace, /proc/sys/net/ipv4/ping_group_range is reset to the
// default of 1 0, which does not match any groups. However, it can only be
// overridden when the namespace has a fake root. This may be a kernel bug.
WriteFile("/proc/sys/net/ipv4/ping_group_range", "0 0");
}
}

static void EnterWorkingDirectory() {
Expand Down
Loading