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
..
2017-06-08 00:46:47 +02:00
2013-03-03 19:36:31 -08:00
2015-04-29 10:34:00 +02:00
2013-05-07 20:16:25 -07:00
2015-04-29 10:34:00 +02:00
2013-05-31 15:17:56 -04:00
2013-03-03 19:36:31 -08:00
2018-03-21 23:07:40 +01:00
2013-04-09 14:12:56 -04: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
2013-11-29 11:11:53 -08:00
2013-03-03 19:36:31 -08:00
2018-03-21 22:42:30 +01:00
2016-02-25 11:57:46 -08:00
2013-05-01 14:08:52 -07:00
2018-05-03 18:33:29 +02:00
2016-03-16 08:41:37 -07:00
2013-03-03 19:36:31 -08:00
2014-02-13 13:48:00 -08:00
2018-05-03 18:37:22 +02:00
2018-03-21 22:33:47 +01:00
2017-06-08 00:46:47 +02:00
2018-03-21 23:07:40 +01:00
2017-06-08 00:46:49 +02:00
2018-03-21 23:07:35 +01:00
2013-03-12 18:55:21 -07: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
2013-04-29 15:41:42 -04:00
2017-06-21 15:42:43 +02:00
2017-02-10 11:03:30 +01:00
2013-05-03 09:56:25 -07: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
2013-03-23 14:15:31 -07:00
2013-03-03 19:36:31 -08:00
2015-04-29 10:34:00 +02:00
2018-03-21 23:07:35 +01:00
2013-02-13 06:15:14 -08:00
2018-05-03 18:37:22 +02:00
2018-03-21 22:58:21 +01:00
2012-06-01 19:51:22 -07:00
2015-08-16 20:51:35 -07:00
2013-05-07 20:16:25 -07:00
2017-06-20 08:03:01 +02:00
2015-06-05 23:19:54 -07:00
2013-03-03 19:36:31 -08:00
2018-03-21 23:07:35 +01:00
2018-03-21 23:00:38 +01:00
2013-03-03 19:36:31 -08:00
2013-05-31 15:17:31 -04:00
2015-01-29 17:40:57 -08:00
2013-02-26 20:16:07 -08:00
2018-03-21 23:00:38 +01:00
2013-04-29 09:17:57 +10:00
2013-03-11 07:09:48 -07:00
2013-04-05 15:35:52 -07: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
2013-04-30 09:36:50 -07:00
2018-03-21 23:07:35 +01:00
2018-03-21 22:51:37 +01:00
2013-02-26 02:46:11 -05:00
2014-06-16 13:42:52 -07:00
2012-12-17 17:15:12 -08:00
2013-05-01 17:51:54 -07:00
2013-05-02 10:16:16 -07:00
2018-03-21 22:51:04 +01:00
2012-12-17 17:15:23 -08:00
2013-04-29 15:40:23 -04:00
2013-04-30 17:04:03 -07:00
2012-12-20 17:40:19 -08:00
2012-11-28 21:53:38 -05:00
2014-03-23 21:38:21 -07:00
2013-10-05 07:13:09 -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
2012-10-06 03:05:15 +09:00
2017-06-20 14:04:14 +02:00
2014-02-13 13:48:00 -08:00
2018-03-21 23:07:40 +01:00
2018-03-13 20:29:02 +01:00
2012-12-17 17:15:27 -08:00
2018-03-13 20:29:02 +01:00
2018-05-03 18:49:05 +02:00
2013-02-22 23:31:31 -05: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
2013-03-03 19:36:31 -08:00
2013-03-01 23:51:07 -05: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
2013-02-22 23:31:31 -05:00
2018-03-21 22:31:40 +01:00
2013-04-17 13:25:09 +01:00
2013-04-30 17:04:04 -07:00
2015-04-29 10:34:00 +02:00
2016-03-09 15:31:53 -08:00
2013-05-01 17:51:54 -07:00
2011-05-25 08:39:26 -07:00
2014-02-06 11:08:16 -08:00
2012-02-28 19:31:58 -05:00
2018-05-03 18:46:03 +02:00
2018-03-21 22:33:51 +01:00
2010-10-15 15:53:27 +02:00
2015-07-03 19:48:08 -07:00
2016-08-21 23:22:36 +02:00
2013-05-31 15:16:33 -04:00
2013-05-01 17:51:54 -07:00
2018-03-21 23:40:56 +01:00
2012-07-14 16:32:48 +04:00
2014-02-13 13:48:00 -08: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
2012-02-28 19:31:58 -05:00
2015-01-29 17:40:57 -08:00
2013-10-18 07:45:44 -07:00
2018-03-21 23:00:38 +01:00
2013-03-03 22:46:22 -05:00
2018-03-13 20:29:02 +01:00
2012-12-20 18:50:08 -05:00
2012-10-12 13:16:48 -07:00
2012-12-20 18:50:11 -05:00