mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
dd2927197b
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> |
||
---|---|---|
.. | ||
encrypted-keys | ||
compat.c | ||
gc.c | ||
internal.h | ||
Kconfig | ||
key.c | ||
keyctl.c | ||
keyring.c | ||
Makefile | ||
permission.c | ||
proc.c | ||
process_keys.c | ||
request_key.c | ||
request_key_auth.c | ||
sysctl.c | ||
trusted.c | ||
trusted.h | ||
user_defined.c |