android_kernel_motorola_sm6375/fs/fscache
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers d124b2c53c FS-Cache: fix dereference of NULL user_key_payload
When the file /proc/fs/fscache/objects (available with
CONFIG_FSCACHE_OBJECT_LIST=y) is opened, we request a user key with
description "fscache:objlist", then access its payload.  However, a
revoked key has a NULL payload, and we failed to check for this.
request_key() *does* skip revoked keys, but there is still a window
where the key can be revoked before we access its payload.

Fix it by checking for a NULL payload, treating it like a key which was
already revoked at the time it was requested.

Fixes: 4fbf4291aa ("FS-Cache: Allow the current state of all objects to be dumped")
Reviewed-by: James Morris <[email protected]>
Cc: <[email protected]>    [v2.6.32+]
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: David Howells <[email protected]>
2017-10-12 17:16:40 +01:00
..
cache.c
cookie.c
fsdef.c
histogram.c
internal.h
Kconfig
main.c
Makefile
netfs.c
object-list.c FS-Cache: fix dereference of NULL user_key_payload 2017-10-12 17:16:40 +01:00
object.c fscache: Fix dead object requeue 2017-01-31 13:23:09 -05:00
operation.c
page.c mm: remove nr_pages argument from pagevec_lookup{,_range}() 2017-09-06 17:27:27 -07:00
proc.c
stats.c