lkml.org 
[lkml]   [2013]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: IMA: How to manage user space signing policy with others
From
Date
On Mon, 2013-03-04 at 14:15 -0500, Vivek Goyal wrote:

> I am just brain storming and throwing some ideas and see if soemthing
> makes sense. I agree that allowing one policy only makes it very
> restrictive (while simplifying the implementation).

Agreed, lets try again ... I think we are actually getting closer.

Without the memory locking or caching issues, would you agree that both
the builtin 'secureboot' and the 'ima_appraise_tcb' policies meet the
secure boot needs? If both policies are acceptable, then we could
define the builtin 'secureboot' policy as the default policy, which
could be replaced with the 'ima_appraise_tcb' policy, if specified on
the boot command line. This would eliminate any need for merging of
rules or rule flags.

To address the memory locking and caching issues, we could define a new
extended attribute type called IMA_XATTR_SECURE_BOOT.

enum evm_ima_xattr_type {
IMA_XATTR_DIGEST = 0x01,
EVM_XATTR_HMAC,
EVM_IMA_XATTR_DIGSIG,
};

and set a corresponding flag in iint->flags. The flag could then be the
bases for setting up any special secureboot requirements, like memory
locking and no caching.

diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
index ddeadc7..6ec1575 100644
--- a/security/integrity/ima/ima_appraise.c
+++ b/security/integrity/ima/ima_appraise.c
@@ -172,6 +172,8 @@ int ima_appraise_measurement(int func, struct integrity_iint_cache *iint,
}
status = INTEGRITY_PASS;
break;
+ case IMA_XATTR_SECURE_BOOT:
+ iint->flags |= IMA_SB;
case EVM_IMA_XATTR_DIGSIG:
iint->flags |= IMA_DIGSIG;
rc = integrity_digsig_verify(INTEGRITY_KEYRING_IMA,
As originally intended, the policy defines which files are appraised,
not how they are appraised. The extended attribute defines how the file
is to be appraised.

thanks,

Mimi



\
 
 \ /
  Last update: 2013-03-05 02:41    [W:0.202 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site