← Documents Documentation/admin-guide/namespaces/resource-control.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Namespaces

User namespaces and resource control

User namespace가 야기할 수 있는 resource misuse를 memory cgroup과 사용자별 memory limit으로 완화합니다.

Source pathDocumentation/admin-guide/namespaces/resource-control.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

운영 권고

resource-control.rst:1-18
관점핵심
위험UID 전환으로 개별 limit이 무력화돼 resource misuse가 가능할 수 있습니다.
완화User namespace를 켠 시스템에서는 memory control group을 활성화합니다.
제한신뢰하지 않는 사용자별 maximum memory를 cgroup으로 제한합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 ====================================
2 User namespaces and resource control
3 ====================================
4
5 The kernel contains many kinds of objects that either don't have
6 individual limits or that have limits which are ineffective when
7 a set of processes is allowed to switch their UID. On a system
8 where the admins don't trust their users or their users' programs,
9 user namespaces expose the system to potential misuse of resources.
10
11 In order to mitigate this, we recommend that admins enable memory
12 control groups on any system that enables user namespaces.
13 Furthermore, we recommend that admins configure the memory control
14 groups to limit the maximum memory usable by any untrusted user.
15
16 Memory control groups can be configured by installing the libcgroup
17 package present on most distros editing /etc/cgrules.conf,
18 /etc/cgconfig.conf and setting up libpam-cgroup.
19

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

User namespace의 resource 위험

1-10

Kernel에는 object별 limit이 없거나, process 집합이 UID를 바꿀 수 있을 때 limit이 효과를 잃는 여러 종류의 object가 있습니다. Administrator가 사용자 또는 사용자 program을 신뢰하지 않는 system에서 user namespace를 허용하면 resource misuse 가능성이 생깁니다.

Memory cgroup 권고

11-15

이 위험을 줄이려면 user namespace를 활성화한 모든 system에서 memory control group도 활성화할 것을 권장합니다. 또한 신뢰하지 않는 각 사용자가 쓸 수 있는 maximum memory를 memory cgroup으로 제한해야 합니다.

구성 도구와 파일

16-18

대부분의 distribution에 있는 `libcgroup` package를 설치하고 `/etc/cgrules.conf`, `/etc/cgconfig.conf`를 편집한 뒤 `libpam-cgroup`을 설정해 memory control group을 구성할 수 있습니다.