fix CVE-2019-5736 by using as less memory as possible#1987
Closed
lifubang wants to merge 1 commit intoopencontainers:masterfrom
Closed
fix CVE-2019-5736 by using as less memory as possible#1987lifubang wants to merge 1 commit intoopencontainers:masterfrom
lifubang wants to merge 1 commit intoopencontainers:masterfrom
Conversation
3f13bd3 to
b182050
Compare
Signed-off-by: Lifubang <lifubang@acmcoder.com> Signed-off-by: lifubang <lifubang@acmcoder.com>
b182050 to
dbbee9d
Compare
cyphar
reviewed
Feb 23, 2019
| return "", err | ||
| } | ||
| id := uuid.New() | ||
| temp := fmt.Sprintf("/tmp/runc.%s", id) |
Member
There was a problem hiding this comment.
If we're going to do it this way, I would want to use memfd_create because using /tmp won't always work and memfd_create is a fool-proof way of doing it. But ultimately I could just rewrite #1984 entirely to not use C code.
Member
|
#1984 now makes this no longer relevant -- since by default we try doing a read-only bind-mount which takes up no memory or storage (which is better than this approach). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm a code fan of opencontainers/runc project.
And my business is
Online Judge (OJ), which is based on docker.To ensure fairness of the OJ examination, we need to use memory limit with 4m, 5m, or 10m.
So, I need to fix
CVE-2019-5736by using as less memory as possible.I open this PR to figure out my solution by using code, because my English is very poor.
My solution is to copy a new runc binary file with a random name before we start to run
runc initcommand. And delete it afterrunc initstarted.If there is a problem, please point out and discuss it.
Thanks.
Signed-off-by: Lifubang lifubang@acmcoder.com