It has been found that multiple containers modify the permissions of /etc/passwd to make them modifiable by users other than root. An attacker with access to the running container can exploit this to modify /etc/passwd to add a user and escalate their privileges. This CVE is specific to the openshift/tests-container
Name: Joseph LaMagna-Reiter (SPR Inc.)
This is intentional , and the risk was deemed low because the test image should only be used for throw-away containers with short lifetimes. Now that at least some CI jobs run in 4.3 clusters based on CRI-O , we may be able to revert  to take advantage of . We may also be able to revert  because we are removing our 'ssh' from the teardown container . So hopefully will be able to return to more appropriate creds on the password file soon. I'll see about nudging those efforts along.
This is not a CVE. We should not have removed this code.
Containers that depend on /etc/passwd not being writable are not in our security threat model.
Changing this broke test infrastructure.
I reverted this change in https://bugzilla.redhat.com/show_bug.cgi?id=1813428, see the linked descriptions there.
In a container environment like openshift it is trivial to subvert any part of the filesystem, so no caller may depend on filesystem permissions for anything other than trivial security. Just like mount on the host allows you to subvert the kernel (by replacing locations on disk the kernel accesses), in OpenShift/Kubernetes the ability to specify volume mounts allows you to subvert any process in the behavior.
If a user wants to change the permissions back they can create their own image.
(In reply to Clayton Coleman from comment #9)
> I reverted this change in
> https://bugzilla.redhat.com/show_bug.cgi?id=1813428, see the linked
> descriptions there.
> In a container environment like openshift it is trivial to subvert any part
> of the filesystem, so no caller may depend on filesystem permissions for
> anything other than trivial security. Just like mount on the host allows you
> to subvert the kernel (by replacing locations on disk the kernel accesses),
> in OpenShift/Kubernetes the ability to specify volume mounts allows you to
> subvert any process in the behavior.
> If a user wants to change the permissions back they can create their own
In regards to the openshift/ose-tests container we can perhaps justify dropping the CVE.
However, at this time we would have to disagree and argue that a writable /etc/passwd file is in fact a CVE. Making the argument that this is an unintended escalation of privileges and in general increases the attack surface of a node.
We're coming from the other perspective (not a user/admin of OpenShift but consumer), accessing an application such as Jenkins, in the default namespace unnecessarily allows for any process/user in the container to add their own root user to /etc/passwd.
This is an issue because if you can setuid, you are the equivalent of root on the node. Albeit you still have to bypass SELinux and dropped capabilities.
With the latest updates to CRI-O this technique for a writable /etc/passwd for nearly all containers shouldn't be required anymore - unless there are requirements such as testing.
Rejecting this CVE.
The reasoning is that this is a test image and is used in a throw away/short live container. Additionally, a writable /etc/passwd is required by the test infrastructure.
Closing this flaw. Trackers closed except for 4.4, which seems like it's been added to a RHBA anyway.
Red Hat Product Security does not consider this to be a vulnerability.
This container image is for testing purposes and is used in a throw away/short lived life cycle. Additionally, a writable /etc/passwd is required by the test infrastructure to function correctly.