4 ms·
root can undo that with echo /sbin/modprobe > /proc/sys/kernel/modprobe at any time so you are better off using: echo 1 > /proc/sys/kernel/modules_disabled
by sdeziel 10y ago
root can undo that with echo /sbin/modprobe > /proc/sys/kernel/modprobe at any time so you are better off using:
echo 1 > /proc/sys/kernel/modules_disabled
- sp332 10y agoDoes this work in a container that shares a kernel with the host?
- sdeziel 10y agoNo, /proc/sys/kernel/{modules_disabled,modprobe} are not writable from a container. Tested with LXD on Ubuntu 16.04.
- geofft 10y agoIf you're root, a local privilege escalation isn't going to get you any more privileges than you already have. If you're root in a container, but not root on the outside system, you shouldn't be able to write to /proc/sys/kernel/modprobe, no?
- sdeziel 10y agoI just wanted to mention that the path to modprobe is something reversible (containers aside) if the sysadmin wants autoloading. /proc/sys/kernel/modprobe is not writable from a container. Disabling module loading is not reversible, you need to reboot.