Skip to contentSkip to conversation

integrity: support new struct public_key_signature encoding field

PATCH In review Mimi Zohar 2 participants 2 messages Nov 11, 2018 – Nov 12, 2018

Subsystems (5)
lore
Share & tools
lore

Mimi Zohar

author maintainer
#0 lore raw

PATCH 1/1 integrity: support new struct public_key_signature encoding field

On systems with IMA-appraisal enabled with a policy requiring file signatures, the "good" signature values are stored on the filesystem as extended attributes (security.ima). Signature verification failure would normally be limited to just a particular file (eg. executable), but during boot signature verification failure could result in a system hang.

Defining and requiring a new public_key_signature field requires all callers of asymmetric signature verification to be updated to reflect the change. This patch updates the integrity asymmetric_verify() caller.

Fixes 82f94f24475c ("KEYS: Provide software public key query function [ver #2]")
Cc David Howells <[email protected]>
Cc Denis Kenzior <[email protected]>
---
 security/integrity/digsig_asymmetric.c | 1 +
 1 file changed, 1 insertion(+)
security/integrity/digsig_asymmetric.c +1 -0
index 6dc075144508..d775e03fbbcc 100644
@@ -106,6 +106,7 @@ int asymmetric_verify(struct key *keyring, const char *sig,
 
 	pks.pkey_algo = "rsa";
 	pks.hash_algo = hash_algo_name[hdr->hash_algo];
+	pks.encoding = "pkcs1";
 	pks.digest = (u8 *)data;
 	pks.digest_size = datalen;
 	pks.s = hdr->sig;
Signature · 1 line
2.7.5
#1 lore raw

Hi Mimi,

Quoted 12 lines · Mimi Zohar

On systems with IMA-appraisal enabled with a policy requiring file signatures, the "good" signature values are stored on the filesystem as extended attributes (security.ima). Signature verification failure would normally be limited to just a particular file (eg. executable), but during boot signature verification failure could result in a system hang.

Defining and requiring a new public_key_signature field requires all callers of asymmetric signature verification to be updated to reflect the change. This patch updates the integrity asymmetric_verify() caller.

Quoted 8 lines
Fixes 82f94f24475c ("KEYS: Provide software public key query function [ver #2]")
Cc David Howells <[email protected]>
Cc Denis Kenzior <[email protected]>
---
  security/integrity/digsig_asymmetric.c | 1 +
  1 file changed, 1 insertion(+)

Acked/Reviewed by: Denis Kenzior <[email protected]>

Regards,
-Denis