Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1660656

[PATCH v2 3/6] ima: Log the same audit cause whenever a file has no signature

From Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH v2 3/6] ima: Log the same audit cause whenever a file has no signature
Date 2017-06-08 04:00 +0200
Message-ID <tPUTT-68a-7@gated-at.bofh.it> (permalink)
References <tPUKe-65e-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


If the file doesn't have an xattr, ima_appraise_measurement sets cause to
"missing-hash" while if there's an xattr but it's a digest instead of a
signature it sets cause to "IMA-signature-required".

Fix it by setting cause to "IMA-signature-required" in both cases.

Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
---
 security/integrity/ima/ima_appraise.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
index ea36a4f134f4..809ba70fbbbf 100644
--- a/security/integrity/ima/ima_appraise.c
+++ b/security/integrity/ima/ima_appraise.c
@@ -217,7 +217,8 @@ int ima_appraise_measurement(enum ima_hooks func,
 		if (rc && rc != -ENODATA)
 			goto out;
 
-		cause = "missing-hash";
+		cause = iint->flags & IMA_DIGSIG_REQUIRED ?
+				"IMA-signature-required" : "missing-hash";
 		status = INTEGRITY_NOLABEL;
 		if (opened & FILE_CREATED)
 			iint->flags |= IMA_NEW_FILE;
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] Appended signatures support for IMA appraisal Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-08 03:50 +0200
  [PATCH v2 6/6] ima: Support module-style appended signatures for appraisal Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-08 04:00 +0200
    Re: [PATCH v2 6/6] ima: Support module-style appended signatures  for appraisal Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-06-14 14:50 +0200
  [PATCH v2 2/6] ima: Simplify policy_func_show. Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-08 04:00 +0200
    Re: [PATCH v2 2/6] ima: Simplify policy_func_show. Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-06-15 18:10 +0200
  [PATCH v2 4/6] integrity: Introduce struct evm_hmac_xattr Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-08 04:00 +0200
  [PATCH v2 3/6] ima: Log the same audit cause whenever a file has no signature Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-08 04:00 +0200
    Re: [PATCH v2 3/6] ima: Log the same audit cause whenever a file  has no signature Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-06-15 18:10 +0200
  [PATCH v2 5/6] MODSIGN: Export module signature definitions. Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-08 04:00 +0200
  [PATCH v2 1/6] integrity: Small code improvements Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-08 04:00 +0200
    Re: [PATCH v2 1/6] integrity: Small code improvements Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-06-15 18:10 +0200
  Re: [PATCH v2 0/6] Appended signatures support for IMA appraisal Michael Ellerman <mpe@ellerman.id.au> - 2017-06-09 12:30 +0200
    Re: [PATCH v2 0/6] Appended signatures support for IMA appraisal Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-09 23:30 +0200
      Re: [PATCH v2 0/6] Appended signatures support for IMA appraisal Michael Ellerman <mpe@ellerman.id.au> - 2017-06-13 12:20 +0200

csiph-web