summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLans Zhang <jia.zhang@windriver.com>2017-08-15 09:56:49 +0800
committerLans Zhang <jia.zhang@windriver.com>2017-08-15 10:16:41 +0800
commit2c265a6fc3e7df1e8530326c3ec733c2fa34d2f1 (patch)
treeb485717c55e55399309377eb1e6ad6830e30d915
parent09f1239567b2337d1dbf26d4339ee8b9326b8469 (diff)
downloadmeta-secure-core-2c265a6fc3e7df1e8530326c3ec733c2fa34d2f1.tar.gz
meta-integrity/README.md: update
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r--meta-integrity/README.md68
1 files changed, 38 insertions, 30 deletions
diff --git a/meta-integrity/README.md b/meta-integrity/README.md
index 2efb494..9525227 100644
--- a/meta-integrity/README.md
+++ b/meta-integrity/README.md
@@ -22,22 +22,49 @@ files and applications to be loaded if the hashes match (and will save the
22updated hash if the file is modified) but refuse to load it if it doesn't. This 22updated hash if the file is modified) but refuse to load it if it doesn't. This
23provides some protection against offline tampering of the files. 23provides some protection against offline tampering of the files.
24 24
25NOTE: Extended file system attribute is required for IMA appraisal, but not 25By default, the following constraint conditions are applied by design of this
26layer:
27
28- Appraise the files for exec'd (the executables), files mmap'd for exec
29 (shared libraries), kernel modules and firmwares in effective root identity
30 (euid=0).
31- Enforce verifying the IMA signature when running the executables, shared
32 libraries, kernel modules and firmwares.
33- Deny to run the newly created executables, shared libraries, kernel modules
34 and firmwares.
35- Deny to run the tampered executables, shared libraries, kernel modules and
36 firmwares.
37- Deny to run any executables, shared libraries, kernel modules and firmwares
38 in the filesystems without file extended attribute supported.
39- Allow to run the manually signed executables, shared libraries, kernel
40 modules and firmwares.
41- Allow to run the updated executables, shared libraries, kernel modules and
42 firmwares during RPM installation.
43- Enforce the subsequent policy file write to be verified by a trusted IMA
44 certificate.
45
46NOTE:
47- The different behaviors when executing a script, e.g, launching a python
48script with "./test.py" is allowed only when test.py is signed, and launching
49a python script with "python test.py" is always allowed as long as the python
50interpreter is signed.
51- Extended file system attribute is required for IMA appraisal, but not
26all file systems can support it. Typically, the pseudo file systems, such as 52all file systems can support it. Typically, the pseudo file systems, such as
27sysfs, proc, tmpfs and ramfs, certain disk-based file systems, such as FAT, 53sysfs, proc, tmpfs and ramfs, certain disk-based file systems, such as FAT,
28and network file systems, such as NFS, don't support extended attribute, 54and network file systems, such as NFS, don't support extended attribute,
29meaning IMA appraisal is not available with them. 55meaning IMA appraisal is not available with them.
30 56
31##### Dependency 57##### Dependency
32- meta-tpm 58- meta-tpm
33 This layer provides the kernel configurations for TPM 1.x enablement. 59 This layer provides the kernel configurations and TSS for TPM 1.x enablement.
34 60
35- meta-tpm2 61- meta-tpm2
36 This layer provides the kernel configurations for TPM 2.0 enablement. 62 This layer provides the kernel configurations and TSS for TPM 2.0 enablement.
37 63
38##### Use The External IMA Policy 64##### Use The External IMA Policy
39initramfs is a good place to run some IMA initializations, such as loading 65initramfs is a good place to run some IMA initializations, such as loading
40the IMA policy, as well as the public keys used to verify IMA signatures. 66the IMA policy, as well as the trusted IMA certificate used to verify IMA
67signatures.
41 68
42###### The default external IMA policy 69###### The default external IMA policy
43The default external IMA policy enforces appraising all the executable, shared 70The default external IMA policy enforces appraising all the executable, shared
@@ -47,34 +74,15 @@ external IMA policy occurs at the end of initramfs initializations, just before
47switch_root. 74switch_root.
48 75
49Instead of running switch_root directly from initramfs, a statically linked 76Instead of running switch_root directly from initramfs, a statically linked
50switch_root from the real rootfs is called and it must be already signed 77switch_root from the real rootfs is launched and it must be already signed
51properly. Otherwise, switch_root will fail to mount the real rootfs and kernel 78properly. Otherwise, switch_root will fail to mount the real rootfs and kernel
52panic will happen due to this failure. 79panic will happen due to this failure.
53 80
54The default external IMA policy is located at `/etc/ima_policy.default` in 81The default external IMA policy is located at `/etc/ima_policy.default` in
55initramfs. If a custom external IMA policy file exists, the default external 82initramfs. If a custom external IMA policy file exists at `/etc/ima_policy`,
56IMA policy file won't be used any more. 83the default external IMA policy file won't be used. In addition, the IMA
57 84policies signed by the trusted IMA certificate in the real rootfs is also
58The default external IMA policy enables the following constraint conditions: 85attempted to be loaded if any.
59- Appraise the files for exec'd (the executables), files mmap'd for exec
60 (shared libraries), kernel modules and firmwares in effective root identity
61 (euid=0).
62- Enforce verifying the IMA signature when running the executables, shared
63 libraries, kernel modules and firmwares.
64- Deny to run the newly created executables, shared libraries, kernel modules
65 and firmwares.
66- Deny to run the tampered executables, shared libraries, kernel modules and
67 firmwares.
68- Deny to run any executables, shared libraries, kernel modules and firmwares
69 in the filesystems without file extended attribute supported.
70- Allow to run the manually signed executables, shared libraries, kernel
71 modules and firmwares.
72- Allow to run the updated executables, shared libraries, kernel modules and
73 firmwares during RPM installation.
74- Note the different behaviors when executing a script.
75 e.g, launching a python script with "./test.py" is allowed only when test.py
76 is signed, and launching a python script with "python test.py" is always
77 allowed as long as the python interpreter is signed.
78 86
79###### The custom external IMA policy 87###### The custom external IMA policy
80If the default external IMA policy cannot meet the protection requirement, it 88If the default external IMA policy cannot meet the protection requirement, it