Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubelet: set terminationMessagePath perms to 0660
Currently, kubelet creates a world-readable and world-writeable empty files in `/var/lib/kubelet/pods/{podUID}/containers/busysleep/{containerId}`. These are meant to be written by the process in containers when container is terminated. Originally, this file was created with `0644`, then despite security concerns, it was changed to `0666` in kubernetes#31839. This was completed to allow containers running as non-root to write termination messages. Later on, in 2019 this has been highlighted as a security vulnerability in Kubernetes Security Audir Report in kubernetes#81116. This commit changes termination log file mode to `0660` which is best of both worlds - it removes world-writeable file, yet still allows the container's user to write the termination message.
- Loading branch information