Skip to content

RFC ima: Support a mode to appraise signed files only

Vivek Goyal lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest6 patches 9 repliesIn review
  2. v2 RFC2 patches 0 repliesSuperseded
  3. v1 RFC2 patches 44 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ima: detect security xattrs not enabledsecurity/integrity/ima/ima_appraise.c+4 -00 replies
2/6ima: Return INTEGRITY_FAIL if digital signature can't be verifiedsecurity/integrity/ima/ima_appraise.c+1 -35 replies
3/6ima/evm: Differentiate between ima/evm nolabel return codeinclude/linux/integrity.h security/integrity/evm/evm_main.c security/integrity/ima/ima_appraise.c+5 -40 replies
4/6ima: Introduce new integrity error code INTEGRITY_XATTR_NOTSUPPinclude/linux/integrity.h security/integrity/ima/ima_appraise.c+3 -20 replies
5/6ima: Allow appraisal of digitally signed files onlyDocumentation/ABI/testing/ima_policy security/integrity/ima/ima_main.c security/integrity/ima/ima_policy.c +1 more+16 -32 replies
6/6ima: With appraise_type=optional, audit log some messages as infosecurity/integrity/ima/ima_appraise.c+10 -20 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchMimi Zohar
1/6A-b
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [RFC PATCH 0/6][v3] ima: Support a mode to appraise signed files only

Hi,

Currently ima appraises all the files as specified by the rule. So if one wants to create a system where only few executables are signed, that system will not work with IMA.

With secureboot, one needs to disable kexec so that unsigned kernels can't be booted. To avoid this problem, it was proposed that sign /sbin/kexec binary and if signatures are verified successfully, give an special capability to the /sbin/kexec process. And in secureboot mode processes with that special capability can invoke sys_kexec() system call.

So there is a need for IMA to allow appraising only signed binaries. Unsigned binaries will pass the appraisal too, but will not get the special capability. (Capability patches for that are yet to be written).

This patch series adds new option, appraise_type=optional to allow appraisal to pass even if no signatures are present on the file. If signatures are present, then it has to be valid digital signature, otherwise appraisal will fail.

v2: Changed patches based on Mimi's feedback.
v3: - Changed appraise_type=imasig_optional to appraise_type=optional
- Introduced new error codes.

Thanks
Vivek

Vivek Goyal (6):
ima: detect security xattrs not enabled
ima: Return INTEGRITY_FAIL if digital signature can't be verified ima/evm: Differentiate between ima/evm nolabel return code
ima: Introduce new integrity error code INTEGRITY_XATTR_NOTSUPP
ima: Allow appraisal of digitally signed files only
ima: With appraise_type=optional, audit log some messages as info

 Documentation/ABI/testing/ima_policy  |    2 +-
 include/linux/integrity.h             |    4 +++-
 security/integrity/evm/evm_main.c     |    2 +-
 security/integrity/ima/ima_appraise.c |   26 ++++++++++++++++++--------
 security/integrity/ima/ima_main.c     |   14 ++++++++++++--
 security/integrity/ima/ima_policy.c   |    2 ++
 security/integrity/integrity.h        |    1 +
 7 files changed, 38 insertions(+), 13 deletions(-)
Signature · 1 line
1.7.7.6