Bug 1306254

Summary: docker: User gets root in running pod when 'USER root' is set and 'USER default' not appended
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bleanhar, ccoleman, dmcphers, dwalsh, jechoi, jhonce, jialiu, jkeck, jkrieger, jokerman, khong, kseifried, lmeyer, lsm5, mmccomas, security-response-team
Target Milestone: ---Keywords: Reopened, Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-16 23:01:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1304699    
Bug Blocks: 1306257    

Description Adam Mariš 2016-02-10 12:30:23 UTC
It was reported that during docker-build, if 'USER root' is set and 'USER default' is not appended afterward in the Dockerfile, a user gets root in the running pod after deployment.

Product bug (contains reproducer):

https://bugzilla.redhat.com/show_bug.cgi?id=1304699

Comment 1 Kurt Seifried 2016-02-10 21:41:45 UTC
Spoke with Brenton to confirm this is NOTABUG, misunderstanding of how Docker/builds works.

Comment 2 Jeremy Choi 2016-02-10 23:37:48 UTC
I don't think this can be closed as 'NOTABUG'. At least Openshift Enterprise is preventing this issue, ending up having a non-root user instead. Any reason why Origin cannot do the same thing as Enterprise?