Pavel Emelyanov
1bbc9fbe37
irmap: Get root mntfd before releasing tasks on predump
...
We have a use-after-free in predump code:
1st the free_pstree() is called in pre_dump_tasks(), then we
go to irmap_predump_run() which may call the lookup_irmap()
which, in turn, dereferences the root_item to get the root
mount ns fd.
But the problem is bigger than that. After we've released the
tasks (done before freeing pstree on predump) we can no longer
access them by PIDs, so keeping the root-item after irmap
scan is not a fix.
Fix is to get the root fd before releasing the tasks and using
one in irmap scanner.
Caught recently on iterative inotify_irmap test.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
2014-10-01 12:42:50 +04:00
..
2014-04-08 15:35:46 +04:00
2014-02-21 16:27:16 +04:00
2014-08-19 12:58:36 +04:00
2013-02-15 17:34:38 +04:00
2014-02-18 12:53:09 +04:00
2013-02-18 18:42:08 +04:00
2014-09-10 18:35:57 +04:00
2013-12-18 14:26:10 +04:00
2014-06-27 14:24:33 +04:00
2013-11-15 17:00:14 +04:00
2014-02-28 13:34:29 +04:00
2013-12-26 22:39:04 +04:00
2014-08-06 10:20:27 +04:00
2013-04-02 20:27:51 +04:00
2013-11-14 22:22:21 +04:00
2014-02-02 22:14:29 +04:00
2014-02-02 22:14:29 +04:00
2014-02-25 23:38:35 +04:00
2013-11-15 17:00:58 +04:00
2013-08-21 03:52:18 +04:00
2014-04-21 22:39:28 +04:00
2014-08-12 14:38:49 +04:00
2014-08-06 19:14:16 +04:00
2014-07-04 15:09:03 +04:00
2014-08-21 18:35:22 +04:00
2014-02-02 22:14:29 +04:00
2014-08-19 13:09:49 +04:00
2014-06-24 22:48:40 +04:00
2012-12-25 22:40:24 +04:00
2013-11-06 18:17:38 +04:00
2014-10-01 12:42:50 +04:00
2013-11-15 17:00:58 +04:00
2013-11-14 22:13:59 +04:00
2014-04-08 15:32:35 +04:00
2012-12-25 22:40:24 +04:00
2014-01-14 09:33:19 +04:00
2013-08-16 19:37:06 +04:00
2014-04-25 13:23:55 +04:00
2014-08-06 19:18:34 +04:00
2014-02-03 23:34:12 +04:00
2013-11-14 22:48:30 +04:00
2014-08-06 10:57:27 +04:00
2014-04-23 13:22:12 +04:00
2014-02-12 00:33:02 +04:00
2013-11-15 17:00:58 +04:00
2013-11-15 16:59:57 +04:00
2012-12-25 22:40:24 +04:00
2014-02-10 15:06:39 +04:00
2014-06-20 16:35:52 +04:00
2013-12-18 14:52:04 +04:00
2014-02-21 16:29:41 +04:00
2014-05-27 23:40:07 +04:00
2014-08-15 23:10:44 +04:00
2013-11-15 16:59:57 +04:00
2013-08-21 03:52:18 +04:00
2013-12-26 22:39:04 +04:00
2014-04-17 12:01:02 +04:00
2014-08-15 23:10:44 +04:00
2014-08-21 18:35:22 +04:00
2014-08-06 19:18:34 +04:00
2014-08-12 14:38:22 +04:00
2014-08-12 14:41:00 +04:00
2014-02-07 15:32:17 +04:00
2013-01-09 17:02:47 +04:00
2014-08-19 13:00:10 +04:00
2014-07-04 15:09:06 +04:00
2013-12-12 10:00:45 +04:00
2014-05-27 23:48:06 +04:00
2014-08-19 13:00:07 +04:00
2013-11-06 12:39:36 +04:00
2014-02-02 22:14:29 +04:00
2013-11-15 17:00:58 +04:00
2014-02-10 14:31:02 +04:00
2013-11-06 12:43:49 +04:00
2013-12-12 10:00:53 +04:00
2014-02-04 14:03:10 +04:00
2014-03-26 01:44:23 +04:00
2014-04-21 22:38:23 +04:00
2012-12-25 22:40:24 +04:00
2014-08-21 18:35:22 +04:00
2014-08-07 10:18:09 +04:00
2013-11-06 18:17:38 +04:00
2013-11-15 17:00:58 +04:00
2013-01-09 17:02:47 +04:00
2013-12-12 10:03:07 +04:00
2014-07-14 15:14:37 +04:00
2013-11-15 17:00:58 +04:00
2014-08-04 15:35:03 +04:00
2014-08-21 18:35:22 +04:00
2014-03-14 13:39:28 +04:00