You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux kernel 5.13 adds support for Landlock Linux Security Module (LSM).
This allows unprivileged processes to create safe security sandboxes
that can securely restrict the ambient rights (e.g. global filesystem
access) for themselves.
#1110
Co-authored-by: Zheao Li <me@manjusaka.me>
Signed-off-by: Kailun Qin <kailun.qin@intel.com>
Copy file name to clipboardExpand all lines: config.md
+78-1Lines changed: 78 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -340,6 +340,27 @@ For Linux-based systems, the `process` object supports the following process-spe
340
340
341
341
***`class`** (string, REQUIRED) specifies the I/O scheduling class. Possible values are `IOPRIO_CLASS_RT`, `IOPRIO_CLASS_BE`, and `IOPRIO_CLASS_IDLE`.
342
342
***`priority`** (int, REQUIRED) specifies the priority level within the class. The value should be an integer ranging from 0 (highest) to 7 (lowest).
343
+
For more information about SELinux, see [SELinux documentation][selinux].
344
+
***`landlock`** (object, OPTIONAL) specifies the Landlock unprivileged access control settings for the container process.
345
+
Note that `noNewPrivileges` must be set to true to use this feature.
346
+
For more information about Landlock, see [Landlock documentation][landlock].
347
+
`landlock` contains the following properties:
348
+
349
+
***`ruleset`** (object, OPTIONAL) the `ruleset` field identifies a set of rules (i.e., actions on objects) that need to be handled (i.e., restricted).
350
+
The `ruleset` currently contains the following types:
351
+
* **`handledAccessFS`** (array of strings, OPTIONAL) is an array of FS typed actions that are handled by a ruleset.
352
+
If no rule explicitly allow them, they should then be forbidden.
353
+
***`rules`** (object, OPTIONAL) the `rules` field specifies the security policies (i.e., actions allowed on objects) to be added to an existing ruleset.
354
+
The `rules` currently contains the following types:
355
+
* **`pathBeneath`** (array of objects, OPTIONAL) is an array of the file-hierarchy typed rules.
356
+
Entries in the array contain the following properties:
357
+
* **`allowedAccess`** (array of strings, OPTIONAL) is an array of FS typed actions that are allowed by a rule.
358
+
* **`paths`** (array of strings, OPTIONAL) is an array of files or parent directories of the file hierarchies to restrict.
359
+
***`disableBestEffort`** (bool, OPTIONAL) the `disableBestEffort` field disables the best-effort security approach for Landlock access rights.
360
+
This is for conditions when the Landlock access rights explicitly configured by the container are not supported or available in the running kernel.
361
+
If the best-effort security approach is enabled (`false`), the runtime SHOULD enforce the strongest rules configured up to the current kernel support, and only be [logged as a warning](runtime.md#warnings) for those not supported.
362
+
If disabled (`true`), the runtime MUST [generate an error](runtime.md#errors) if one or more rules specified by the container is not supported.
363
+
Default is `false`, i.e., following a best-effort security approach.
343
364
344
365
### <aname="configUser" />User
345
366
@@ -385,6 +406,61 @@ _Note: symbolic name for uid and gid, such as uname and gname respectively, are
385
406
"class": "IOPRIO_CLASS_IDLE",
386
407
"priority": 4
387
408
},
409
+
"landlock": {
410
+
"ruleset": {
411
+
"handledAccessFS": [
412
+
"execute",
413
+
"write_file",
414
+
"read_file",
415
+
"read_dir",
416
+
"remove_dir",
417
+
"remove_file",
418
+
"make_char",
419
+
"make_dir",
420
+
"make_reg",
421
+
"make_sock",
422
+
"make_fifo",
423
+
"make_block",
424
+
"make_sym"
425
+
]
426
+
},
427
+
"rules": {
428
+
"pathBeneath": [
429
+
{
430
+
"allowedAccess": [
431
+
"execute",
432
+
"read_file",
433
+
"read_dir"
434
+
],
435
+
"paths": [
436
+
"/usr",
437
+
"/bin"
438
+
]
439
+
},
440
+
{
441
+
"allowedAccess": [
442
+
"execute",
443
+
"write_file",
444
+
"read_file",
445
+
"read_dir",
446
+
"remove_dir",
447
+
"remove_file",
448
+
"make_char",
449
+
"make_dir",
450
+
"make_reg",
451
+
"make_sock",
452
+
"make_fifo",
453
+
"make_block",
454
+
"make_sym"
455
+
],
456
+
"paths": [
457
+
"/tmp"
458
+
]
459
+
}
460
+
]
461
+
},
462
+
"disableBestEffort": false
463
+
},
388
464
"noNewPrivileges": true,
389
465
"capabilities": {
390
466
"bounding": [
@@ -1135,7 +1211,8 @@ Here is a full example `config.json` for reference.
0 commit comments