George Dunlap
ce2f426058
tools/dm_depriv: Add first cut RLIMITs
...
Limit the ability of a potentially compromised QEMU to consume system
resources. Key limits:
- RLIMIT_FSIZE (file size): 256KiB
- RLIMIT_NPROC (after uid changes to a unique uid)
Probably unnecessary limits but why not:
- RLIMIT_CORE: 0
- RLIMIT_MSGQUEUE: 0
- RLIMIT_LOCKS: 0
- RLIMIT_MEMLOCK: 0
NB that we do not yet set RLIMIT_AS (total virtual memory) or
RLIMIT_NOFILES (number of open files), since these require more care
and/or more coordination with QEMU to implement.
Suggested-by: Ross Lagerwall <ross.lagerwall@citrix.com >
Signed-off-by: George Dunlap <george.dunlap@citrix.com >
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com >
---
Changes since v4:
- Put global headers before local headers (sugg by Paul)
- Move #undif inside the braces (sugg by Paul)
Changes since v3:
- Align RLIMIT_ENTRY list for easier reading
- Fix wrong format string specifier
- Get rid of some trailing whitespace
Changes since v2:
- Use a macro to define rlimit entries
- Use RLIMIT_NLIMITS as an end-of-list marker, rather than -1
- Various style clean-ups
CC: Ian Jackson <ian.jackson@citrix.com >
CC: Wei Liu <wei.liu2@citrix.com >
CC: Anthony Perard <anthony.perard@citrix.com >
2018-11-06 15:41:25 +00:00
..
2012-08-01 12:46:52 +01:00
2016-09-08 16:15:59 +01:00
2013-12-09 15:20:12 +00:00
2013-12-09 15:20:12 +00:00
2013-10-10 15:48:55 +01:00
2018-10-30 17:03:23 +00:00
2012-10-05 14:34:30 +01:00
2012-10-08 11:45:29 +01:00
2015-08-13 10:47:08 +01:00
2017-10-04 11:09:46 +01:00
2017-09-28 12:04:06 +01:00
2014-07-10 13:06:55 +01:00
2018-01-25 11:35:21 +00:00
2015-11-24 16:16:34 +00:00
2018-11-02 14:22:20 +00:00
2018-08-17 16:40:50 +01:00
2016-09-30 11:47:27 +01:00
2018-11-02 14:22:20 +00:00
2016-09-30 11:47:27 +01:00
2016-09-08 16:15:59 +01:00
2017-09-28 15:28:01 +01:00
2017-09-22 16:29:18 +01:00
2018-01-25 11:35:14 +00:00
2017-03-16 18:25:16 +00:00
2016-12-12 09:48:07 +00:00
2017-03-20 15:27:53 +00:00
2017-09-22 16:29:18 +01:00
2017-03-14 11:36:52 +00:00
2018-07-25 11:07:46 +01:00
2015-08-05 10:40:35 +01:00
2018-08-14 16:56:47 +01:00
2017-02-16 12:47:12 +00:00
2018-11-02 14:22:20 +00:00
2018-04-25 14:38:47 +02:00
2018-01-25 11:35:14 +00:00
2018-11-06 15:41:24 +00:00
2018-03-14 12:35:53 +00:00
2018-03-14 12:35:53 +00:00
2018-11-06 10:19:32 +00:00
2018-09-05 11:53:35 +01:00
2018-07-30 14:46:32 +01:00
2018-10-08 15:20:18 +01:00
2015-12-15 12:03:08 +00:00
2015-03-05 17:06:43 +00:00
2015-10-23 14:32:45 +01:00
2018-11-06 15:41:24 +00:00
2016-07-12 12:49:41 +01:00
2017-02-17 16:09:38 +01:00
2018-11-06 15:41:24 +00:00
2018-08-21 12:16:02 +01:00
2018-08-21 12:16:02 +01:00
2015-05-21 14:59:17 +01:00
2015-06-25 10:59:08 +01:00
2018-11-06 15:41:25 +00:00
2018-09-07 15:01:39 +01:00
2018-11-06 15:41:24 +00:00
2018-01-25 11:35:14 +00:00
2018-01-25 11:35:21 +00:00
2016-12-03 15:57:34 +00:00
2015-07-15 11:22:53 +01:00
2016-09-08 16:15:59 +01:00
2016-07-13 14:24:02 +01:00
2016-02-26 15:14:47 +00:00
2016-10-24 11:53:20 +01:00
2017-03-15 10:22:33 +00:00
2018-07-16 16:09:14 +01:00
2018-09-21 17:13:00 +01:00
2018-01-18 11:32:51 +00:00
2018-03-30 12:51:55 +01:00
2018-10-08 15:20:18 +01:00
2016-04-01 14:33:16 +01:00
2016-12-03 15:57:34 +00:00
2017-09-26 11:10:08 +01:00
2017-09-26 11:10:08 +01:00
2017-10-11 12:20:17 +01:00
2018-03-21 16:24:58 +00:00
2016-04-01 11:07:28 +08:00
2017-09-28 15:28:02 +01:00
2017-09-28 15:28:02 +01:00
2015-07-15 11:40:43 +01:00
2015-07-15 11:40:43 +01:00
2015-07-15 11:40:44 +01:00
2014-02-06 14:21:30 +00:00
2017-02-13 10:59:19 +00:00
2018-07-10 08:47:21 +01:00
2018-10-03 15:57:46 +01:00
2018-01-25 11:35:19 +00:00
2018-08-21 11:57:50 +01:00
2018-07-25 11:08:19 +01:00
2016-04-08 15:07:17 +01:00
2016-04-20 14:34:04 +01:00
2018-07-10 08:46:10 +01:00
2018-07-25 11:08:22 +01:00
2016-12-03 15:57:35 +00:00
2018-07-10 15:17:43 +01:00
2018-01-25 11:35:21 +00:00
2018-04-23 14:31:05 +01:00
2016-09-28 14:32:05 +01:00
2018-11-02 14:22:20 +00:00
2017-02-08 15:00:02 +00:00
2018-09-13 17:03:32 +01:00
2018-09-13 17:03:32 +01:00
2015-03-18 12:05:35 +00:00
2016-09-05 11:53:16 +01:00
2015-10-22 16:05:39 +01:00
2013-04-12 08:55:18 +01:00
2015-10-22 16:05:39 +01:00
2015-10-22 16:05:39 +01:00
2015-03-18 12:05:35 +00:00
2016-02-17 12:34:33 -05:00
2012-08-06 12:28:03 +01:00
2016-12-13 20:25:25 +00:00
2016-12-13 20:25:25 +00:00
2016-12-13 20:25:25 +00:00
2014-06-17 10:08:57 +01:00
2015-03-19 10:35:12 +00:00
2015-07-29 15:26:56 +01:00
2013-10-10 15:48:55 +01:00
2015-07-23 13:45:26 +01:00
2018-07-25 11:07:46 +01:00
2011-10-12 16:21:32 +01:00
2015-07-15 11:40:43 +01:00
2015-07-15 11:40:43 +01:00
2015-07-15 16:02:33 +01:00
2014-02-06 14:21:30 +00:00
2017-05-12 11:05:08 +01:00
2017-03-14 14:13:14 +00:00