-
-
Notifications
You must be signed in to change notification settings - Fork 137
Description
i've isolated the symptom to this container by shutting this off for 2 days and no issues until i cycled through each container 1 by 1 and kdevtmpfsi started on my host soon after this container ran.
After killing the VM host that was clearly infected and starting a new VM host to run docker, i replicated the behavior, there is definitely a security hole in linuxserver/nextcloud docekr containr.
Also during my investigation i noticed user abc starting php-fpm7 nginx processes - is this expected? strange user name choice if it is typical behavior.
This is my docker service call;
docker create \
--name=nextcloud \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Australia/Melbourne \
-p 3002:80 \
-v $HOME/nextcloud/config:/config \
-v $HOME/nextcloud/data:/data \
--restart unless-stopped \
linuxserver/nextcloud:17.0.1-ls52@sha256:5b928942971bca3ce30e012c8fa8694c41180b7f6e91804d5d271ace7c9085a6
That was the latest version yesterday (locking to latest
and using sha256 is self-defeating when latest bumps and breaks the hash verification).
I'm going to try to generate a seccomp for this container, i'll add here if successful.
it might also be worth removing the SUID flag inside the containers when you are building them, i typically have luck using;
RUN for i in
find / -path /proc -prune -o -perm /6000 -type f; do chmod a-s $i; done
This "may" prevent some container breakouts.
EDIT: it is worth mentioning the SUID flag is only problematic in a few circumstances, the most obvious being when a user inside docker matches one of the host (like root
which you're using). An better solution is declaring a unique USER
in the Dockerfile