2025-04-21 12:17:23 -04:00
|
|
|
====================================
|
|
|
|
User namespaces and resource control
|
|
|
|
====================================
|
2019-04-18 12:43:16 -03:00
|
|
|
|
2025-04-21 12:17:23 -04:00
|
|
|
The kernel contains many kinds of objects that either don't have
|
|
|
|
individual limits or that have limits which are ineffective when
|
|
|
|
a set of processes is allowed to switch their UID. On a system
|
|
|
|
where the admins don't trust their users or their users' programs,
|
|
|
|
user namespaces expose the system to potential misuse of resources.
|
2013-01-25 16:48:31 -08:00
|
|
|
|
2025-04-21 12:17:23 -04:00
|
|
|
In order to mitigate this, we recommend that admins enable memory
|
|
|
|
control groups on any system that enables user namespaces.
|
|
|
|
Furthermore, we recommend that admins configure the memory control
|
|
|
|
groups to limit the maximum memory usable by any untrusted user.
|
2013-01-25 16:48:31 -08:00
|
|
|
|
|
|
|
Memory control groups can be configured by installing the libcgroup
|
|
|
|
package present on most distros editing /etc/cgrules.conf,
|
|
|
|
/etc/cgconfig.conf and setting up libpam-cgroup.
|