Fixes CVE-2019-13139 git ref cmd injection #360
Merged
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.
Signed-off-by: TomSweeneyRedHat tsweeney@redhat.com
- What I did
Add a check to the git reference to validate that it did not have a leading dash '-' in front of it, allowing for a security injection. This is per CVE-2019-13139 and BZ https://bugzilla.redhat.com/show_bug.cgi?id=1733941
Corresponding change from upstream Docker: moby#38944
Fixed in Docker 1.13.1-rhel here: #359
- How I did it
Lots of vi and testing.
- How to verify it
Without the fix this is the way to reproduce the issue:
With the error in play, there will be a master and a rogue test branch created, the test branch should not be there.
With the fix:
and only the master branch should be there.
- Description for the changelog
Addresses CVE-2019-13139 - docker: command injection due to a missing validation of the git ref command
- A picture of a cute animal (not mandatory but encouraged)