Skip to content

Commit

Permalink
integrity: support new struct public_key_signature encoding field
Browse files Browse the repository at this point in the history
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: 82f94f2 ("KEYS: Provide software public key query function [ver #2]")
Signed-off-by: Mimi Zohar <[email protected]>
Cc: David Howells <[email protected]>
Acked-by: Denis Kenzior <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
mimizohar authored and James Morris committed Nov 13, 2018
1 parent ccda4af commit fd35f19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions security/integrity/digsig_asymmetric.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fd35f19

Please sign in to comment.