Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fixes-v5.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security

Pull keys fixes from James Morris:
"Two fixes from Eric Biggers"

* 'fixes-v5.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
KEYS: always initialize keyring_index_key::desc_len
KEYS: user: Align the payload buffer

+5 -7
+1 -1
include/keys/user-type.h
··· 31 31 struct user_key_payload { 32 32 struct rcu_head rcu; /* RCU destructor */ 33 33 unsigned short datalen; /* length of this data */ 34 - char data[0]; /* actual data */ 34 + char data[0] __aligned(__alignof__(u64)); /* actual data */ 35 35 }; 36 36 37 37 extern struct key_type key_type_user;
+1 -3
security/keys/keyring.c
··· 661 661 BUG_ON((ctx->flags & STATE_CHECKS) == 0 || 662 662 (ctx->flags & STATE_CHECKS) == STATE_CHECKS); 663 663 664 - if (ctx->index_key.description) 665 - ctx->index_key.desc_len = strlen(ctx->index_key.description); 666 - 667 664 /* Check to see if this top-level keyring is what we are looking for 668 665 * and whether it is valid or not. 669 666 */ ··· 911 914 struct keyring_search_context ctx = { 912 915 .index_key.type = type, 913 916 .index_key.description = description, 917 + .index_key.desc_len = strlen(description), 914 918 .cred = current_cred(), 915 919 .match_data.cmp = key_default_cmp, 916 920 .match_data.raw_data = description,
+1 -2
security/keys/proc.c
··· 165 165 int rc; 166 166 167 167 struct keyring_search_context ctx = { 168 - .index_key.type = key->type, 169 - .index_key.description = key->description, 168 + .index_key = key->index_key, 170 169 .cred = m->file->f_cred, 171 170 .match_data.cmp = lookup_user_key_possessed, 172 171 .match_data.raw_data = key,
+1
security/keys/request_key.c
··· 531 531 struct keyring_search_context ctx = { 532 532 .index_key.type = type, 533 533 .index_key.description = description, 534 + .index_key.desc_len = strlen(description), 534 535 .cred = current_cred(), 535 536 .match_data.cmp = key_default_cmp, 536 537 .match_data.raw_data = description,
+1 -1
security/keys/request_key_auth.c
··· 247 247 struct key *authkey; 248 248 key_ref_t authkey_ref; 249 249 250 - sprintf(description, "%x", target_id); 250 + ctx.index_key.desc_len = sprintf(description, "%x", target_id); 251 251 252 252 authkey_ref = search_process_keyrings(&ctx); 253 253