Eric Biggers
d2d576e285
FS-Cache: fix dereference of NULL user_key_payload
...
commit d124b2c53c upstream.
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 <james.l.morris@oracle.com >
Signed-off-by: Eric Biggers <ebiggers@google.com >
Signed-off-by: David Howells <dhowells@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-10-27 10:38:11 +02:00
..
2017-05-14 14:00:13 +02:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2017-03-15 10:02:44 +08:00
2017-06-29 13:00:28 +02:00
2016-10-15 12:09:13 -07:00
2016-10-10 23:02:51 -04:00
2017-10-21 17:21:35 +02:00
2016-10-10 20:16:43 -07:00
2017-10-21 17:21:37 +02:00
2017-10-18 09:35:37 +02:00
2016-10-10 20:16:43 -07:00
2017-06-24 07:11:12 +02:00
2017-10-27 10:38:10 +02:00
2017-08-06 18:59:43 -07:00
2016-10-10 20:16:43 -07:00
2017-09-09 17:39:40 +02:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2016-10-27 18:43:43 -07:00
2016-10-06 09:07:44 -04:00
2017-07-27 15:08:02 -07:00
2017-10-18 09:35:37 +02:00
2017-10-21 17:21:35 +02:00
2017-03-15 10:02:52 +08:00
2017-10-27 10:38:11 +02:00
2017-08-16 13:43:17 -07:00
2017-10-08 10:26:02 +02:00
2016-10-10 20:16:43 -07:00
2017-07-27 15:08:07 -07:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2017-10-08 10:26:09 +02:00
2016-11-30 10:41:26 -08:00
2017-03-30 09:41:27 +02:00
2016-10-10 20:16:43 -07:00
2017-08-06 18:59:39 -07:00
2016-10-27 17:47:11 +02:00
2016-10-11 15:06:33 -07:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2017-10-08 10:26:10 +02:00
2017-10-21 17:21:38 +02:00
2017-06-14 15:06:00 +02:00
2017-08-06 18:59:43 -07:00
2016-10-30 13:09:42 -04:00
2017-10-21 17:21:36 +02:00
2016-10-10 20:16:43 -07:00
2016-09-27 21:06:21 -04:00
2017-09-27 14:39:18 +02:00
2017-07-27 15:08:07 -07:00
2017-10-05 09:43:58 +02:00
2017-08-06 18:59:43 -07:00
2016-10-10 20:16:43 -07:00
2017-07-27 15:08:08 -07:00
2017-06-17 06:41:56 +02:00
2016-10-07 21:48:36 -04:00
2017-04-12 12:41:11 +02:00
2016-10-10 20:16:43 -07:00
2016-09-27 21:06:21 -04:00
2017-07-27 15:08:04 -07:00
2017-07-27 15:08:06 -07:00
2017-06-14 15:06:01 +02:00
2017-10-27 10:38:10 +02:00
2017-07-05 14:40:26 +02:00
2016-10-10 20:16:43 -07:00
2017-01-09 08:32:24 +01:00
2017-07-21 07:42:21 +02:00
2016-09-27 21:06:22 -04:00
2017-10-18 09:35:39 +02:00
2017-06-14 15:06:00 +02:00
2016-09-27 21:20:53 -04:00
2017-07-05 14:40:26 +02:00
2017-02-09 08:08:31 +01:00
2017-08-06 18:59:43 -07:00
2017-10-18 09:35:41 +02:00
2017-09-07 08:35:41 +02:00
2017-07-21 07:42:22 +02:00
2017-07-12 15:01:02 +02:00
2016-09-27 18:47:38 -04:00
2017-09-20 08:20:01 +02:00
2017-09-20 08:20:01 +02:00
2017-09-20 08:19:59 +02:00
2016-10-07 18:46:29 -07:00
2016-10-10 20:16:43 -07:00
2016-10-18 12:21:28 +02:00
2017-07-21 07:42:22 +02:00
2017-10-18 09:35:39 +02:00
2017-08-06 18:59:43 -07:00
2017-07-21 07:42:22 +02:00
2016-10-10 20:16:43 -07:00
2017-07-12 15:01:02 +02:00
2016-10-11 15:06:32 -07:00
2017-07-21 07:42:22 +02:00
2017-03-15 10:02:43 +08:00
2017-01-26 08:24:37 +01:00
2017-10-12 11:51:26 +02:00
2016-10-11 15:06:30 -07:00
2016-10-07 18:46:30 -07:00
2017-02-23 17:44:35 +01:00
2017-06-14 15:06:01 +02:00
2017-03-15 10:02:44 +08:00
2017-05-08 07:47:54 +02:00
2017-06-17 06:41:56 +02:00
2016-10-08 11:06:08 -04:00
2017-10-12 11:51:19 +02:00