@@ -27,8 +27,9 @@ Description:
27
27
[fowner=] [fgroup=]]
28
28
lsm: [[subj_user=] [subj_role=] [subj_type=]
29
29
[obj_user=] [obj_role=] [obj_type=]]
30
- option: [[appraise_type=]] [template=] [permit_directio]
31
- [appraise_flag=] [appraise_algos=] [keyrings=]
30
+ option: [digest_type=] [template=] [permit_directio]
31
+ [appraise_type=] [appraise_flag=]
32
+ [appraise_algos=] [keyrings=]
32
33
base:
33
34
func:= [BPRM_CHECK][MMAP_CHECK][CREDS_CHECK][FILE_CHECK][MODULE_CHECK]
34
35
[FIRMWARE_CHECK]
@@ -47,10 +48,21 @@ Description:
47
48
fgroup:= decimal value
48
49
lsm: are LSM specific
49
50
option:
50
- appraise_type:= [imasig] [imasig|modsig]
51
+ appraise_type:= [imasig] | [imasig|modsig] | [sigv3]
52
+ where 'imasig' is the original or the signature
53
+ format v2.
54
+ where 'modsig' is an appended signature,
55
+ where 'sigv3' is the signature format v3. (Currently
56
+ limited to fsverity digest based signatures
57
+ stored in security.ima xattr. Requires
58
+ specifying "digest_type=verity" first.)
59
+
51
60
appraise_flag:= [check_blacklist]
52
61
Currently, blacklist check is only for files signed with appended
53
62
signature.
63
+ digest_type:= verity
64
+ Require fs-verity's file digest instead of the
65
+ regular IMA file hash.
54
66
keyrings:= list of keyrings
55
67
(eg, .builtin_trusted_keys|.ima). Only valid
56
68
when action is "measure" and func is KEY_CHECK.
@@ -149,3 +161,30 @@ Description:
149
161
security.ima xattr of a file:
150
162
151
163
appraise func=SETXATTR_CHECK appraise_algos=sha256,sha384,sha512
164
+
165
+ Example of a 'measure' rule requiring fs-verity's digests
166
+ with indication of type of digest in the measurement list.
167
+
168
+ measure func=FILE_CHECK digest_type=verity \
169
+ template=ima-ngv2
170
+
171
+ Example of 'measure' and 'appraise' rules requiring fs-verity
172
+ signatures (format version 3) stored in security.ima xattr.
173
+
174
+ The 'measure' rule specifies the 'ima-sigv3' template option,
175
+ which includes the indication of type of digest and the file
176
+ signature in the measurement list.
177
+
178
+ measure func=BPRM_CHECK digest_type=verity \
179
+ template=ima-sigv3
180
+
181
+
182
+ The 'appraise' rule specifies the type and signature format
183
+ version (sigv3) required.
184
+
185
+ appraise func=BPRM_CHECK digest_type=verity \
186
+ appraise_type=sigv3
187
+
188
+ All of these policy rules could, for example, be constrained
189
+ either based on a filesystem's UUID (fsuuid) or based on LSM
190
+ labels.
0 commit comments