こんにちは。SIOS OSSエバンジェリスト/セキュリティ担当の面です。
12/11に、linux kernelの最新版である「kernel 4.9」がリリースされました。このリリースは「過去最大のリリース」と銘打たれており、様々な新機能が加わっています。
このリリースを機に、今一度LSMを用いてkernelの機構として導入されている各セキュリティモジュールについて、簡単に動向などをまとめてみましょう。
「linux kernel-4.9」でのLSMのモジュールについて
linux kernel-4.9時点でのLSMモジュールにどのようなものがあるかを見てみます。
kernel自体は、所謂Vanilla Kernel(https://www.kernel.org/pub/linux/kernelからダウンロードできるもの)を使用しています。
実際にlinux kernel-4.2をダウンロードして”make menuconfig”でオプションを見てみると、下記のようになっています。
│ │ -*- Enable access key retention support │ │
│ │ [ ] Enable register of persistent per-UID keyrings │ │
│ │ < > TRUSTED KEYS │ │
│ │ {M} ENCRYPTED KEYS │ │
│ │ [ ] Diffie-Hellman operations on retained keys │ │
│ │ [*] Restrict unprivileged access to the kernel syslog │ │
│ │ [*] Enable different security models │ │
│ │ -*- Enable the securityfs filesystem │ │
│ │ -*- Socket and Networking Security Hooks │ │
│ │ [*] XFRM (IPSec) Networking Security Hooks │ │
│ │ -*- Security hooks for pathname based access control │ │
│ │ [ ] Enable Intel(R) Trusted Execution Technology (Intel(R) TXT) │ │
│ │ (65536) Low address space for LSM to protect from user allocation │ │
│ │ [*] Harden memory copies between kernel and userspace │ │
│ │ [ ] Refuse to copy allocations that span multiple pages │ │
│ │ [*] NSA SELinux Support │ │
│ │ [ ] NSA SELinux boot parameter │ │
│ │ [ ] NSA SELinux runtime disable │ │
│ │ [*] NSA SELinux Development Support │ │
│ │ [*] NSA SELinux AVC Statistics │ │
│ │ (1) NSA SELinux checkreqprot default value │ │
│ │ [ ] Simplified Mandatory Access Control Kernel Support │ │
│ │ [*] TOMOYO Linux Support │ │
│ │ (2048) Default maximal count for learning mode │ │
│ │ (1024) Default maximal count for audit log │ │
│ │ [ ] Activate without calling userspace policy loader. │ │
│ │ (/sbin/tomoyo-init) Location of userspace policy loader │ │
│ │ (/sbin/init) Trigger for calling userspace policy loader │ │
│ │ [*] AppArmor support │ │
│ │ (1) AppArmor boot parameter default value │ │
│ │ [*] Enable introspection of sha1 hashes for loaded profiles │ │
│ │ [*] Enable policy hash introspection by default │ │
│ │ [ ] Pin load of kernel files (modules, fw, etc) to one filesystem │ │
│ │ [*] Yama support │ │
│ │ [*] Integrity subsystem │ │
│ │ [ ] Digital signature verification using multiple keyrings │ │
│ │ [*] Enables integrity auditing support │ │
│ │ [ ] Integrity Measurement Architecture(IMA) │ │
│ │ [ ] EVM support │ │
│ │ Default security module (Unix Discretionary Access Controls) ---> │ │
それぞれのセキュリティモジュールの簡単な紹介
SELinux
SELinuxは(良くも悪くも)既に広く知られている通り、NSAが開発したセキュリティモジュールです。
細かい内容に関してはWeb/書籍などで数々出回っており、このブログでも何度も紹介してますので割愛します。CentOS6系に関してはLPI-Japanの「Linuxセキュリティ標準教科書」にまとまっています。
AppArmor
AppArmorはSELinuxの「ラベルセキュリティ」と異なり「パス名によるセキュリティ」を実装したものになります。古くはSuSE LinuxやUbuntuで実装されているものになっています。
AppArmorに関しては、こちらのDockerと組み合わせた記事でも取り上げています。
SMACK
SMACK(Simplified Mandatory Access Control Kernel)は2008年頃、LSMに取り入れられているモジュールで、簡単なMACを提供します。
SMACKの概略は
https://www.ipa.go.jp/security/fy20/reports/tech1-tg/1_05.html
で触れています。
TOMOYO Linux
TOMOYO Linuxは日本の開発者によって開発された、「ポリシーの自動学習機能」を備えた強制アクセス制御実装になります。
YAMA
YAMAはDAC(任意アクセス制御)を拡張して、システム全体を代表的なセキュリティ攻撃から守るためのモジュールになります。細かい内容に関しては今後、本ブログで提供していきます。
Integrity Subsystem(IMA/EVM)
TCG(Trusted Computing Group)による仕様に基づいて開発されたTPM(Trusted Platform Module)と呼ばれるチップを用いた、完全性を担保するためのシステムになります。
IMA/EVMの概要については
http://www.ipa.go.jp/security/fy23/reports/tech1-tg/a_02.html
に、その時点の情報をまとめてありますが、今後、最新の情報についても本ブログで提供していきます。
[参考]
LPI Linux セキュリティ標準教科書
http://www.lpi.or.jp/linuxtext/security.shtml
IPA 情報セキュリティ技術動向調査(2008 年上期)
https://www.ipa.go.jp/security/fy20/reports/tech1-tg/1_05.html
IPA 情報セキュリティ技術動向調査(20011 年上期)
http://www.ipa.go.jp/security/fy23/reports/tech1-tg/a_02.html
