Kees Cook
6c22e4aea4
pstore/ram: Avoid NULL deref in ftrace merging failure path
...
[ Upstream commit 8665569e97dd52920713b95675409648986b5b0d ]
Given corruption in the ftrace records, it might be possible to allocate
tmp_prz without assigning prz to it, but still marking it as needing to
be freed, which would cause at least a NULL dereference.
smatch warnings:
fs/pstore/ram.c:340 ramoops_pstore_read() error: we previously assumed 'prz' could be null (see line 255)
https://lists.01.org/pipermail/kbuild-all/2018-December/055528.html
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 2fbea82bbb89 ("pstore: Merge per-CPU ftrace records into one")
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-17 20:38:34 +01:00
..
2019-10-11 18:18:38 +02:00
2019-08-06 19:05:21 +02:00
2018-05-30 07:51:47 +02:00
2018-07-08 15:30:51 +02:00
2019-12-17 20:37:24 +01:00
2017-11-02 11:10:55 +01:00
2018-12-01 09:42:51 +01:00
2019-12-05 15:37:25 +01:00
2018-12-17 09:28:53 +01:00
2019-12-05 15:37:06 +01:00
2019-11-10 11:25:19 +01:00
2019-08-06 19:05:23 +02:00
2019-11-12 19:18:18 +01:00
2018-11-13 11:15:12 -08:00
2019-07-31 07:28:22 +02:00
2019-05-08 07:20:49 +02:00
2019-03-23 14:35:21 +01:00
2019-12-17 20:38:33 +01:00
2019-11-20 17:59:32 +01:00
2017-11-02 11:10:55 +01:00
2019-12-05 15:37:28 +01:00
2019-12-17 20:37:26 +01:00
2019-03-23 14:35:23 +01:00
2019-12-05 15:38:19 +01:00
2019-12-17 20:38:12 +01:00
2019-10-07 18:55:12 +02:00
2018-12-17 09:28:53 +01:00
2019-11-20 18:00:52 +01:00
2019-12-05 15:37:32 +01:00
2019-12-01 09:13:57 +01:00
2019-12-01 09:13:56 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-05-31 06:47:12 -07:00
2018-10-03 17:00:57 -07:00
2019-07-31 07:28:47 +02:00
2019-05-08 07:20:49 +02:00
2018-08-09 12:16:39 +02:00
2019-11-20 18:00:02 +01:00
2019-12-17 20:38:15 +01:00
2017-11-02 11:10:55 +01:00
2018-03-28 18:24:43 +02:00
2019-11-24 08:23:12 +01:00
2018-02-03 17:39:08 +01:00
2019-12-17 20:38:18 +01:00
2018-05-30 07:51:47 +02:00
2017-11-02 11:10:55 +01:00
2019-02-06 17:31:37 +01:00
2017-11-02 11:10:55 +01:00
2019-12-05 15:37:51 +01:00
2017-11-02 11:10:55 +01:00
2019-11-24 08:23:30 +01:00
2019-10-05 12:48:09 +02:00
2019-11-24 08:23:23 +01:00
2019-12-17 20:38:34 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-07-21 09:04:28 +02:00
2017-09-06 17:27:26 -07:00
2018-11-27 16:10:46 +01:00
2017-11-02 11:10:55 +01:00
2018-09-05 09:26:32 +02:00
2018-09-05 09:26:41 +02:00
2018-12-17 09:28:48 +01:00
2019-09-19 09:08:06 +02:00
2019-07-21 09:04:30 +02:00
2019-05-25 18:25:36 +02:00
2019-12-05 15:37:33 +01:00
2018-12-21 14:13:04 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-04 19:05:15 -04:00
2017-09-14 18:13:32 -07:00
2019-10-05 12:48:06 +02:00
2019-07-03 13:15:59 +02:00
2018-06-26 08:06:33 +08:00
2019-11-06 12:42:59 +01:00
2019-04-17 08:37:53 +02:00
2019-04-05 22:31:28 +02:00
2019-05-31 06:47:31 -07:00
2019-11-20 17:59:57 +01:00
2017-11-02 11:10:55 +01:00
2018-04-26 11:02:14 +02:00
2019-02-06 17:31:34 +01:00
2019-04-27 09:35:41 +02:00
2019-03-13 14:03:18 -07:00
2019-02-12 19:46:10 +01:00
2019-12-05 15:38:25 +01:00
2017-12-17 15:07:59 +01:00
2017-11-02 11:10:55 +01:00
2017-08-28 00:50:23 -04:00
2019-04-05 22:31:28 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-11-12 19:18:47 +01:00
2019-06-22 08:16:19 +02:00
2017-09-13 09:11:44 -07:00
2018-11-10 07:48:33 -08:00
2019-12-17 20:38:00 +01:00
2019-10-17 13:43:52 -07:00
2018-10-03 17:00:53 -07:00
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:25 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-12-01 09:42:59 +01:00
2018-11-21 09:24:14 +01:00
2017-11-02 11:10:55 +01:00
2019-07-31 07:28:58 +02:00
2019-05-04 09:15:18 +02:00
2017-11-02 11:10:55 +01:00
2019-12-01 09:13:51 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:28 +01:00
2017-11-02 11:10:55 +01:00
2019-05-04 09:15:18 +02:00
2017-11-02 11:10:55 +01:00
2019-10-11 18:18:48 +02:00
2018-05-30 07:51:47 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-08-29 08:26:43 +02:00
2017-11-02 11:10:55 +01:00
2018-10-10 08:54:27 +02:00