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

Assemble the list of userns-scoped sysctls #34

Open
AkihiroSuda opened this issue May 14, 2021 · 0 comments
Open

Assemble the list of userns-scoped sysctls #34

AkihiroSuda opened this issue May 14, 2021 · 0 comments

Comments

@AkihiroSuda
Copy link
Member

AkihiroSuda commented May 14, 2021

Some sysctls are modifiable in a user namespace, some are not. We should have the list of such sysctls.
This work is hard, but the list of sysctls that cannot be even read can be easily identified:

$ uname -a
Linux suda-ws01 5.11.0-17-generic #18-Ubuntu SMP Thu May 6 20:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ unshare -rminpCTf --mount-proc sysctl -a >/dev/null
sysctl: permission denied on key 'fs.protected_fifos'
sysctl: permission denied on key 'fs.protected_hardlinks'
sysctl: permission denied on key 'fs.protected_regular'
sysctl: permission denied on key 'fs.protected_symlinks'
sysctl: permission denied on key 'kernel.apparmor_display_secid_mode'
sysctl: permission denied on key 'kernel.cad_pid'
sysctl: permission denied on key 'kernel.unprivileged_userns_apparmor_policy'
sysctl: permission denied on key 'kernel.usermodehelper.bset'
sysctl: permission denied on key 'kernel.usermodehelper.inheritable'
sysctl: permission denied on key 'vm.mmap_rnd_bits'
sysctl: permission denied on key 'vm.mmap_rnd_compat_bits'
sysctl: permission denied on key 'vm.stat_refresh'
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

No branches or pull requests

1 participant