Skip to content

[Proposal] New DMZ solution to defeat CVE-2019-5736 #4450

Closed
@lifubang

Description

@lifubang

Because of CVE-2019-5736, we have to take some actions to prevent runc binary in the host
could be modified from the container, we had many solutions for these years, for example:
bindfd, memfd, otmpfile, os tmpfile, Embedded dmz and overlay. Most of then can work
for most of times, but in practice, there were many issues for these solutions. So we should find
some new possible solutions.

For Embedded dmz solution, we embed a small binary file to start the real container process,
but it may cause some issues(#4518), especially the capability behavior change issue(#4125). So
we make this solution as a opt-in solution. Consider we have moved the binary clone code
from runc init to runc parent process(#3987), so the memory usage of binary clone will not
be included in container's memory cgroup accounting. We can embed a big binary file in runc,
and copy it to memfd, then use it to start runc init process.

The whole steps should like this:

  1. Move runc init to contrib/cmd and it could be compiled as a separate binary file, for example
    name it as runc-dmz;
  2. Embed runc-dmz to runc binary;
  3. Remove the runc-dmz file;
  4. Change the old dmz solution to copy runc-dmz binary data to memfd;
  5. Use this memfd to start runc init, like runc-dmz init.

I think the size of runc-dmz should be smaller than runc, and we can read it to memory paralleled,
so it would help to reduce the start time of the container, and will fix the issue #4449.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions