mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-01 23:18:41 +00:00
moby: device "all" will add to the cgroup whitelist
After the runc security advisory[1] the default cgroup device whitelist was changed. In previous versions every container had "rwm" (read, write, mknod) for every device ("a" for all). Typically this was overridden by container engines like Docker. In LinuxKit we left the permissive default. In recent `runc` versions the default allow-all rule was removed, so a container can only access a device if it is specifically granted access, which LinuxKit handles via a device: entry. However it is inconvenient for pkg/format, pkg/mount, pkg/swap to list all possible block devices up-front. Therefore we add the ability to grant access to an entire class of device with a single rule: ``` - path: all type: b ``` Obviously a paranoid user can still override this with a specific major/minor number in a device: rule. [1] https://github.com/opencontainers/runc/security/advisories/GHSA-g54h-m393-cpwq Signed-off-by: David Scott <dave@recoil.org>
This commit is contained in:
14
docs/yaml.md
14
docs/yaml.md
@@ -245,8 +245,18 @@ devices:
|
||||
mode: 0666
|
||||
```
|
||||
|
||||
See the [the getty package](../pkg/getty/build.yml) for a more complete example
|
||||
and see [runc](https://github.com/opencontainers/runc/commit/60e21ec26e15945259d4b1e790e8fd119ee86467) for context).
|
||||
See the [getty package](../pkg/getty/build.yml) for a more complete example
|
||||
and see [runc](https://github.com/opencontainers/runc/commit/60e21ec26e15945259d4b1e790e8fd119ee86467) for context.
|
||||
|
||||
To grant access to all block devices use:
|
||||
|
||||
```
|
||||
devices:
|
||||
- path: all
|
||||
type: b
|
||||
```
|
||||
|
||||
See the [format package](../pkg/format/build.yml) for an example.
|
||||
|
||||
### Mount Options
|
||||
When mounting filesystem paths into a container - whether as part of `onboot` or `services` - there are several options of which you need to be aware. Using them properly is necessary for your containers to function properly.
|
||||
|
Reference in New Issue
Block a user