1
0
Fork 0
mirror of https://github.com/followmsi/android_kernel_google_msm.git synced 2024-11-06 23:17:41 +00:00
android_kernel_google_msm/security/keys
Takashi Iwai 187c38d0b6 KEYS: Fix stale key registration at error path
commit b26bdde5bb27f3f900e25a95e33a0c476c8c2c48 upstream.

When loading encrypted-keys module, if the last check of
aes_get_sizes() in init_encrypted() fails, the driver just returns an
error without unregistering its key type.  This results in the stale
entry in the list.  In addition to memory leaks, this leads to a kernel
crash when registering a new key type later.

This patch fixes the problem by swapping the calls of aes_get_sizes()
and register_key_type(), and releasing resources properly at the error
paths.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=908163
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-04-14 17:33:45 +08:00
..
encrypted-keys KEYS: Fix stale key registration at error path 2015-04-14 17:33:45 +08:00
compat.c Fix: compat_rw_copy_check_uvector() misuse in aio, readv, writev, and security keys 2013-03-14 11:29:51 -07:00
gc.c KEYS: Add missing smp_rmb() primitives to the keyring search code 2012-01-18 10:41:27 +11:00
internal.h keys: add a "logon" key type 2012-01-17 22:39:40 -06:00
key.c Created a function for setting timeouts on keys 2012-03-01 16:50:31 -05:00
keyctl.c key: Fix resource leak 2013-03-28 12:12:27 -07:00
keyring.c KEYS: Add missing smp_rmb() primitives to the keyring search code 2012-01-18 10:41:27 +11:00
Makefile encrypted-keys: create encrypted-keys directory 2011-09-14 15:22:26 -04:00
permission.c KEYS: Fix up comments in key management code 2011-01-21 14:59:30 -08:00
proc.c KEYS: Improve /proc/keys 2011-03-17 11:59:32 +11:00
process_keys.c keys: fix race with concurrent install_user_keyrings() 2013-03-14 11:29:51 -07:00
request_key.c usermodehelper: kill umh_wait, renumber UMH_* constants 2012-03-23 16:58:41 -07:00
request_key_auth.c KEYS: Don't return EAGAIN to keyctl_assume_authority() 2011-06-14 15:03:29 +10:00
sysctl.c sysctl: Drop & in front of every proc_handler. 2009-11-18 08:37:40 -08:00
trusted.c keys: fix trusted/encrypted keys sparse rcu_assign_pointer messages 2012-01-18 10:41:29 +11:00
trusted.h trusted-keys: rename trusted_defined files to trusted 2011-01-24 10:14:22 +11:00
user_defined.c Merge git://git.samba.org/sfrench/cifs-2.6 2012-01-23 08:59:49 -08:00