Andrea Arcangeli
14468afe50
fs/exec: fix use after free in execve
...
"file" can be already freed if bprm->file is NULL after
search_binary_handler() return. binfmt_script will do exactly that for
example. If the VM reuses the file after fput run(), this will result in
a use ater free.
So obtain d_is_su before search_binary_handler() runs.
This should explain this crash:
[25333.009554] Unable to handle kernel NULL pointer dereference at virtual address 00000185
[..]
[25333.009918] [2: am:21861] PC is at do_execve+0x354/0x474
Change-Id: I2a8a814d1c0aa75625be83cb30432cf13f1a0681
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org >
2018-05-03 18:49:05 +02:00
..
2018-03-21 22:46:39 +01:00
2015-04-29 10:34:00 +02:00
2015-04-29 10:34:00 +02:00
2018-03-21 23:07:40 +01:00
2015-04-29 10:34:00 +02:00
2018-03-21 23:07:35 +01:00
2018-05-03 18:37:22 +02:00
2018-03-21 22:42:30 +01:00
2016-02-25 11:57:46 -08:00
2018-05-03 18:33:29 +02:00
2016-03-16 08:41:37 -07:00
2018-05-03 18:37:22 +02:00
2018-03-21 22:33:47 +01:00
2018-03-21 22:31:34 +01:00
2018-03-21 23:07:40 +01:00
2018-03-13 20:30:12 +01:00
2018-03-21 23:07:35 +01:00
2017-11-02 07:16:17 +01:00
2018-03-21 23:07:40 +01:00
2018-03-21 23:07:35 +01:00
2015-10-01 12:07:34 +02:00
2015-10-01 12:07:34 +02:00
2017-02-10 11:03:30 +01:00
2015-09-21 10:00:10 -07:00
2017-06-21 15:42:43 +02:00
2017-02-10 11:03:30 +01:00
2017-06-20 08:02:35 +02:00
2018-03-21 22:52:38 +01:00
2018-03-21 23:06:23 +01:00
2016-03-03 15:06:20 -08:00
2015-04-29 10:34:00 +02:00
2018-03-21 23:07:35 +01:00
2018-05-03 18:37:22 +02:00
2018-03-21 22:58:21 +01:00
2015-08-16 20:51:35 -07:00
2018-03-21 23:00:38 +01:00
2015-06-05 23:19:54 -07:00
2018-03-21 23:07:35 +01:00
2018-03-21 23:00:38 +01:00
2015-01-29 17:40:57 -08:00
2018-03-21 23:00:38 +01:00
2016-02-19 14:22:39 -08:00
2018-03-21 23:06:23 +01:00
2017-11-02 10:45:57 +01:00
2018-03-21 23:07:35 +01:00
2018-03-21 22:51:37 +01:00
2014-06-16 13:42:52 -07:00
2018-03-21 22:51:04 +01:00
2014-03-23 21:38:21 -07:00
2018-03-21 23:06:23 +01:00
2018-03-21 22:31:34 +01:00
2018-03-13 20:29:02 +01:00
2018-03-13 20:29:02 +01:00
2018-03-13 20:29:02 +01:00
2018-05-03 18:37:22 +02:00
2018-03-21 23:00:38 +01:00
2017-06-20 14:04:14 +02:00
2018-03-21 23:07:40 +01:00
2018-03-13 20:29:02 +01:00
2018-03-13 20:29:02 +01:00
2018-05-03 18:49:05 +02:00
2015-06-05 23:20:00 -07:00
2018-03-21 22:46:32 +01:00
2018-03-13 20:29:02 +01:00
2018-03-21 22:36:23 +01:00
2018-03-13 20:30:12 +01:00
2018-03-21 22:46:36 +01:00
2015-07-03 19:48:08 -07:00
2018-03-21 22:31:40 +01:00
2015-04-29 10:34:00 +02:00
2016-03-09 15:31:53 -08:00
2018-05-03 18:46:03 +02:00
2018-03-21 22:33:51 +01:00
2015-07-03 19:48:08 -07:00
2016-08-21 23:22:36 +02:00
2018-03-21 23:40:56 +01:00
2018-05-03 18:47:07 +02:00
2018-03-13 20:29:02 +01:00
2018-03-21 23:00:38 +01:00
2015-08-16 20:51:42 -07:00
2017-06-20 14:04:20 +02:00
2015-01-29 17:40:57 -08:00
2018-03-21 23:00:38 +01:00
2018-03-13 20:29:02 +01:00