Real-World Example
A great example of a container-related vulnerability, which can be prevented by implementing some of the best practices we've discussed, occurred in February 2019. CVE-2019-5736 allows a container process running as root
to escape its container and gain root access to the host and all containers running on that host.
As dangerous as the vulnerability is, the following things that we covered in this chapter would've prevented the issue:
- Vulnerability scanning
- Not running processes as root
- Enabling SELinux
As the vulnerability has a CVE number, security scanning tools would've found it and alerted on it. Also, organizations that did not allow container processes to run as root will have been protected, as the issue only affects processes running as root. Finally, common SELinux policies, such as those that ship with RHEL and CentOS, prevented the issue.
All in all, this is a great real-world example of the benefits of defence...