summaryrefslogtreecommitdiffstats
path: root/kernel/reboot.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-09-21 13:57:40 -0700
committerDavid Howells <dhowells@redhat.com>2017-09-25 15:03:55 +0100
commit44d8143340a99b167c74365e844516b73523c087 (patch)
treea5f1901a9c6323577946f36885f2dc81ec807416 /kernel/reboot.c
parentebb2c2437d8008d46796902ff390653822af6cc4 (diff)
downloadop-kernel-dev-44d8143340a99b167c74365e844516b73523c087.zip
op-kernel-dev-44d8143340a99b167c74365e844516b73523c087.tar.gz
KEYS: fix cred refcount leak in request_key_auth_new()
In request_key_auth_new(), if key_alloc() or key_instantiate_and_link() were to fail, we would leak a reference to the 'struct cred'. Currently this can only happen if key_alloc() fails to allocate memory. But it still should be fixed, as it is a more severe bug waiting to happen. Fix it by cleaning things up to use a helper function which frees a 'struct request_key_auth' correctly. Fixes: d84f4f992cbd ("CRED: Inaugurate COW credentials") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'kernel/reboot.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud