mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 09:41:44 +00:00
f66665c09a
In eCryptfs, we failed to verify that the authentication token keys are
not revoked before dereferencing their payloads, which is problematic
because the payload of a revoked key is NULL. request_key() *does* skip
revoked keys, but there is still a window where the key can be revoked
before we acquire the key semaphore.
Fix it by updating ecryptfs_get_key_payload_data() to return
-EKEYREVOKED if the key payload is NULL. For completeness we check this
for "encrypted" keys as well as "user" keys, although encrypted keys
cannot be revoked currently.
Alternatively we could use key_validate(), but since we'll also need to
fix ecryptfs_get_key_payload_data() to validate the payload length, it
seems appropriate to just check the payload pointer.
Fixes:
|
||
---|---|---|
.. | ||
crypto.c | ||
debug.c | ||
dentry.c | ||
ecryptfs_kernel.h | ||
file.c | ||
inode.c | ||
Kconfig | ||
keystore.c | ||
kthread.c | ||
main.c | ||
Makefile | ||
messaging.c | ||
miscdev.c | ||
mmap.c | ||
read_write.c | ||
super.c |