aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/proc.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-09-18 11:37:39 -0700
committerDavid Howells <dhowells@redhat.com>2017-09-25 15:19:57 +0100
commit8f674565d405a8c0b36ee531849df87f43e72ed5 (patch)
tree70918506b36dfac48aaab5800f09c3581ffc4581 /security/keys/proc.c
parentKEYS: prevent KEYCTL_READ on negative key (diff)
downloadlinux-dev-8f674565d405a8c0b36ee531849df87f43e72ed5.tar.xz
linux-dev-8f674565d405a8c0b36ee531849df87f43e72ed5.zip
KEYS: reset parent each time before searching key_user_tree
In key_user_lookup(), if there is no key_user for the given uid, we drop key_user_lock, allocate a new key_user, and search the tree again. But we failed to set 'parent' to NULL at the beginning of the second search. If the tree were to be empty for the second search, the insertion would be done with an invalid 'parent', scribbling over freed memory. Fortunately this can't actually happen currently because the tree always contains at least the root_key_user. But it still should be fixed to make the code more robust. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'security/keys/proc.c')
0 files changed, 0 insertions, 0 deletions