Skip to content

Commit 54d1ae4

Browse files
committed
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
2 parents cfd1f03 + f3537f9 commit 54d1ae4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

kernel/module_signing.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
* - Information block
2828
*/
2929
struct module_signature {
30-
enum pkey_algo algo : 8; /* Public-key crypto algorithm */
31-
enum pkey_hash_algo hash : 8; /* Digest algorithm */
32-
enum pkey_id_type id_type : 8; /* Key identifier type */
33-
u8 signer_len; /* Length of signer's name */
34-
u8 key_id_len; /* Length of key identifier */
35-
u8 __pad[3];
36-
__be32 sig_len; /* Length of signature data */
30+
u8 algo; /* Public-key crypto algorithm [enum pkey_algo] */
31+
u8 hash; /* Digest algorithm [enum pkey_hash_algo] */
32+
u8 id_type; /* Key identifier type [enum pkey_id_type] */
33+
u8 signer_len; /* Length of signer's name */
34+
u8 key_id_len; /* Length of key identifier */
35+
u8 __pad[3];
36+
__be32 sig_len; /* Length of signature data */
3737
};
3838

3939
/*

lib/asn1_decoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static int asn1_find_indefinite_length(const unsigned char *data, size_t datalen
9191

9292
/* Extract the length */
9393
len = data[dp++];
94-
if (len < 0x7f) {
94+
if (len <= 0x7f) {
9595
dp += len;
9696
goto next_tag;
9797
}

0 commit comments

Comments
 (0)