android_kernel_samsung_msm8976/security
Eric Biggers dd2927197b KEYS: encrypted: fix buffer overread in valid_master_desc()
With the 'encrypted' key type it was possible for userspace to provide a
data blob ending with a master key description shorter than expected,
e.g. 'keyctl add encrypted desc "new x" @s'.  When validating such a
master key description, validate_master_desc() could read beyond the end
of the buffer.  Fix this by using strncmp() instead of memcmp().  [Also
clean up the code to deduplicate some logic.]

Change-Id: Ib88f30f89c1854a1650ea2b58c2871a515297d82
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Git-commit: 794b4bc292f5d31739d89c0202c54e7dc9bc3add
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
2018-08-20 12:12:17 +02:00
..
apparmor sched: move no_new_privs into new atomic flags 2015-03-19 14:52:51 -07:00
integrity evm: check xattr value length and type in evm_inode_setxattr() 2014-11-14 08:47:54 -08:00
keys KEYS: encrypted: fix buffer overread in valid_master_desc() 2018-08-20 12:12:17 +02:00
mstdrv Import latest Samsung release 2017-04-18 03:43:52 +02:00
sdp Import T813XXS2BRC2 kernel source changes 2018-05-26 00:39:42 +02:00
selinux Add security hooks to binder and implement the hooks for SELinux. 2018-02-06 13:12:15 +01:00
smack
tima_uevent Import latest Samsung release 2017-04-18 03:43:52 +02:00
tomoyo
tz_iccc Import latest Samsung release 2017-04-18 03:43:52 +02:00
yama
Kconfig Import latest Samsung release 2017-04-18 03:43:52 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00
capability.c Add security hooks to binder and implement the hooks for SELinux. 2018-02-06 13:12:15 +01:00
commoncap.c BACKPORT: commoncap: don't alloc the credential unless needed in cap_task_prctl 2018-02-06 13:12:16 +01:00
device_cgroup.c
inode.c vfs: Add permission2 for filesystems with per mount permissions 2018-02-06 13:12:19 +01:00
lsm_audit.c security: add ioctl specific auditing to lsm_audit 2016-05-18 14:34:39 +05:30
min_addr.c
security.c Add security hooks to binder and implement the hooks for SELinux. 2018-02-06 13:12:15 +01:00