diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-06 08:29:08 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-06 08:29:08 -0800 |
commit | 54d1ae492f724f103a07f69c8e429a35d43b5c52 (patch) | |
tree | c4cdcbc2d5223f7efea732cbf041da0ec2220912 | |
parent | cfd1f032f98e5ab3a04f23a0adbd53ff8744827d (diff) | |
parent | f3537f91f9be2ce5fcbaa1aa6d787ad0436daec6 (diff) | |
download | op-kernel-dev-54d1ae492f724f103a07f69c8e429a35d43b5c52.zip op-kernel-dev-54d1ae492f724f103a07f69c8e429a35d43b5c52.tar.gz |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull module signing fixes from Rusty Russell:
"David gave me these a month ago, during my git workflow churn :("
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
ASN.1: Fix an indefinite length skip error
MODSIGN: Don't use enum-type bitfields in module signature info block
-rw-r--r-- | kernel/module_signing.c | 14 | ||||
-rw-r--r-- | lib/asn1_decoder.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/kernel/module_signing.c b/kernel/module_signing.c index ea1b1df..f2970bd 100644 --- a/kernel/module_signing.c +++ b/kernel/module_signing.c @@ -27,13 +27,13 @@ * - Information block */ struct module_signature { - enum pkey_algo algo : 8; /* Public-key crypto algorithm */ - enum pkey_hash_algo hash : 8; /* Digest algorithm */ - enum pkey_id_type id_type : 8; /* Key identifier type */ - u8 signer_len; /* Length of signer's name */ - u8 key_id_len; /* Length of key identifier */ - u8 __pad[3]; - __be32 sig_len; /* Length of signature data */ + u8 algo; /* Public-key crypto algorithm [enum pkey_algo] */ + u8 hash; /* Digest algorithm [enum pkey_hash_algo] */ + u8 id_type; /* Key identifier type [enum pkey_id_type] */ + u8 signer_len; /* Length of signer's name */ + u8 key_id_len; /* Length of key identifier */ + u8 __pad[3]; + __be32 sig_len; /* Length of signature data */ }; /* diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c index de2c8b5..5293d24 100644 --- a/lib/asn1_decoder.c +++ b/lib/asn1_decoder.c @@ -91,7 +91,7 @@ next_tag: /* Extract the length */ len = data[dp++]; - if (len < 0x7f) { + if (len <= 0x7f) { dp += len; goto next_tag; } |