Skip to content

Commit

Permalink
Ensure that sandboxed code cannot create new user namespaces
Browse files Browse the repository at this point in the history
User namespaces are a huge attack surface, so disallow creating new
ones.
  • Loading branch information
DemiMarie committed Nov 15, 2023
1 parent 9189472 commit 6e19baf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/init-container/src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,7 @@ int main(int argc, char **argv) {
block_signals();
if (do_sandbox) {
write_sys("/proc/sys/net/ipv4/ip_unprivileged_port_start", 0);
write_sys("/proc/sys/user/max_user_namespaces", 1);
get_namespace_fd();
}
setup_sigfd();
Expand Down

0 comments on commit 6e19baf

Please sign in to comment.