요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.
1. 요약·해설
원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.
2. 영어 원문 전체
번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.
원문 전체 펼치기
What: /sys/fs/selinux/disable
Date: April 2005 (predates git)
KernelVersion: 2.6.12-rc2 (predates git)
Contact: [email protected]
Description:
REMOVAL UPDATE: The SELinux runtime disable functionality was removed
in March 2023, the original deprecation notice is shown below.
The selinuxfs "disable" node allows SELinux to be disabled at runtime
prior to a policy being loaded into the kernel. If disabled via this
mechanism, SELinux will remain disabled until the system is rebooted.
The preferred method of disabling SELinux is via the "selinux=0" boot
parameter, but the selinuxfs "disable" node was created to make it
easier for systems with primitive bootloaders that did not allow for
easy modification of the kernel command line. Unfortunately, allowing
for SELinux to be disabled at runtime makes it difficult to secure the
kernel's LSM hooks using the "__ro_after_init" feature.
Thankfully, the need for the SELinux runtime disable appears to be
gone, the default Kconfig configuration disables this selinuxfs node,
and only one of the major distributions, Fedora, supports disabling
SELinux at runtime. Fedora is in the process of removing the
selinuxfs "disable" node and once that is complete we will start the
slow process of removing this code from the kernel.
More information on /sys/fs/selinux/disable can be found under the
CONFIG_SECURITY_SELINUX_DISABLE Kconfig option.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.
SELinux runtime disable
1-29| 항목 | 값 |
|---|---|
| What | /sys/fs/selinux/disable |
| Date | 2005년 4월, git 이전 |
| KernelVersion | 2.6.12-rc2, git 이전 |
| Contact | [email protected] |
SELinux runtime disable 기능은 2023년 3월 제거됐다. 아래 내용은 원래의 deprecation 공지다.
selinuxfs의 disable node는 policy를 kernel에 load하기 전에 SELinux를 runtime에서 끌 수 있게 했다. 이 방법으로 비활성화하면 system을 reboot할 때까지 SELinux가 꺼진 상태로 유지된다.
SELinux를 끄는 권장 방법은 selinux=0 boot parameter다. 다만 kernel command line을 쉽게 수정할 수 없는 단순한 bootloader를 사용하는 system을 위해 selinuxfs disable node가 만들어졌다. Runtime에 SELinux를 끌 수 있게 하면 __ro_after_init 기능으로 kernel의 LSM hook을 보호하기가 어려워진다는 문제가 있었다.
원래 공지 시점에는 SELinux runtime disable의 필요성이 사라진 것으로 보였고, 기본 Kconfig configuration은 이 selinuxfs node를 비활성화했다. 주요 distribution 중에는 Fedora만 runtime disable을 지원했으며 Fedora가 disable node를 제거한 뒤 kernel code를 천천히 제거할 계획이었다.
/sys/fs/selinux/disable의 자세한 정보는 CONFIG_SECURITY_SELINUX_DISABLE Kconfig option 아래에 있었다.
Runtime disable 제거
sysfs-selinux-disable:1-29LSM hook을 __ro_after_init로 보호하기 어렵게 만들던 runtime disable 기능은 2023년 3월 제거됐습니다.