linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] KEYS: instantiation and atomicity fixes
@ 2017-09-27 19:50 Eric Biggers
  2017-09-27 19:50 ` [PATCH v3 1/7] KEYS: don't let add_key() update an uninstantiated key Eric Biggers
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Eric Biggers @ 2017-09-27 19:50 UTC (permalink / raw)
  To: linux-security-module

From: Eric Biggers <ebiggers@google.com>

The first two patches in this series fix bugs related to instantiating
keys which allowed unprivileged users to cause a kernel oops.
Specifically, the first patch removes the ability for add_key() to
update an uninstantiated key, as this was heavily broken; and the second
patch fixes a race condition related to add_key() updating a negative
key into a positive one.

The remaining patches fix some other, more theoretical atomicity issues
with accessing key->flags and key->expiry, then eliminate
KEY_FLAG_NEGATIVE, which becomes unnecessary after the second patch.

Eric Biggers (7):
  KEYS: don't let add_key() update an uninstantiated key
  KEYS: fix race between updating and finding negative key
  KEYS: load key flags atomically in key_is_instantiated()
  KEYS: load key flags and expiry time atomically in key_validate()
  KEYS: load key flags and expiry time atomically in
    keyring_search_iterator()
  KEYS: load key flags and expiry time atomically in proc_keys_show()
  KEYS: remove KEY_FLAG_NEGATIVE

 include/linux/key.h                      | 25 +++++++++++++++++++++----
 security/keys/encrypted-keys/encrypted.c |  2 +-
 security/keys/gc.c                       |  4 +---
 security/keys/key.c                      | 24 +++++++++++++++++-------
 security/keys/keyctl.c                   |  5 ++++-
 security/keys/keyring.c                  | 22 +++++++++++++---------
 security/keys/permission.c               |  7 ++++---
 security/keys/proc.c                     | 28 ++++++++++++++++------------
 security/keys/request_key.c              | 11 +++++++----
 security/keys/trusted.c                  |  2 +-
 security/keys/user_defined.c             |  2 +-
 11 files changed, 86 insertions(+), 46 deletions(-)

-- 
2.14.2.822.g60be5d43e6-goog

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-10-12 15:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 19:50 [PATCH v3 0/7] KEYS: instantiation and atomicity fixes Eric Biggers
2017-09-27 19:50 ` [PATCH v3 1/7] KEYS: don't let add_key() update an uninstantiated key Eric Biggers
2017-09-27 19:50 ` [PATCH v3 2/7] KEYS: fix race between updating and finding negative key Eric Biggers
2017-09-27 19:50 ` [PATCH v3 3/7] KEYS: load key flags atomically in key_is_instantiated() Eric Biggers
2017-09-27 19:50 ` [PATCH v3 4/7] KEYS: load key flags and expiry time atomically in key_validate() Eric Biggers
2017-09-27 19:50 ` [PATCH v3 5/7] KEYS: load key flags and expiry time atomically in keyring_search_iterator() Eric Biggers
2017-09-27 19:50 ` [PATCH v3 6/7] KEYS: load key flags and expiry time atomically in proc_keys_show() Eric Biggers
2017-09-27 19:50 ` [PATCH v3 7/7] KEYS: remove KEY_FLAG_NEGATIVE Eric Biggers
2017-10-04 14:34 ` [PATCH v3 1/7] KEYS: don't let add_key() update an uninstantiated key David Howells
2017-10-04 16:33 ` [PATCH v3 2/7] KEYS: fix race between updating and finding negative key David Howells
2017-10-12 15:27 ` [PATCH v3 1/7] KEYS: don't let add_key() update an uninstantiated key David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).