lineage_android_kernel_sams.../security
Sasha Levin f25e91801f KEYS: close race between key lookup and freeing
When a key is being garbage collected, it's key->user would get put before
the ->destroy() callback is called, where the key is removed from it's
respective tracking structures.

This leaves a key hanging in a semi-invalid state which leaves a window open
for a different task to try an access key->user. An example is
find_keyring_by_name() which would dereference key->user for a key that is
in the process of being garbage collected (where key->user was freed but
->destroy() wasn't called yet - so it's still present in the linked list).

This would cause either a panic, or corrupt memory.

Change-Id: I01a5ec17916864929458caa9d0fbefea2ca2c5e2
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 5a64f79179)
2015-01-06 18:48:20 +00:00
..
apparmor sched: move no_new_privs into new atomic flags 2014-09-18 21:18:29 -05:00
integrity evm: prohibit userspace writing 'security.evm' HMAC value 2014-06-26 15:10:28 -04:00
keys KEYS: close race between key lookup and freeing 2015-01-06 18:48:20 +00:00
selinux Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs 2014-09-18 21:00:19 -05:00
smack Smack: move label list initialization 2012-04-18 12:02:28 +10:00
tima_uevent Merge GT-I9505_KK_Opensource_Update5 2014-03-28 02:34:15 -07:00
tomoyo usermodehelper: use UMH_WAIT_PROC consistently 2012-03-23 16:58:41 -07:00
yama Yama: handle 32-bit userspace prctl 2012-10-07 08:32:28 -07:00
Kconfig security: Yama LSM 2012-02-10 09:18:52 +11:00
Makefile Merge GT-I9505_KK_Opensource_Update5 2014-03-28 02:34:15 -07:00
capability.c Add security hooks to binder and implement the hooks for SELinux. 2013-09-27 17:28:20 -07:00
commoncap.c Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs 2014-09-18 21:00:19 -05:00
device_cgroup.c cgroup: remove cgroup_subsys argument from callbacks 2012-02-02 09:20:22 -08:00
inode.c securityfs: fix object creation races 2012-01-10 10:20:35 -05:00
lsm_audit.c lsm_audit: don't specify the audit pre/post callbacks in 'struct common_audit_data' 2012-04-03 09:49:59 -07:00
min_addr.c
security.c Merge GT-I9505_KK_Opensource_Update5 2014-03-28 02:34:15 -07:00