-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clamav user needs to be in tty UNIX group #58
Comments
The change was a security fix in clamav to prevent following symlinks when opening the logfile. See CVE-2024-20506 in https://github.com/Cisco-Talos/clamav/blob/clamav-1.4.1/NEWS.md#141 I am a little confused though. ClamD already writes messages to stdout and stderr in addition to clamd 2>&1 |
Also considering this use case, I do wonder if we should change the logging symlink CVE fix to only use the |
Our configuration was years old, and follows some online HOWTO back then saying that In reading that CVE I don't think that is 100% of the problem. Yes, it causes it to refuse to follow the /dev/stdout symlink - however, if you try to log directly to where the symlink points in the resulting Docker image (
So, I'm suggesting that to retain the ability to log to stdout/stderr the |
This might be caused by a change in the upstream image, but if LogFile is set to output to stdout / stderr (standard for a container deployment), you now get an error:
We get the same error if we set it to
/dev/stdout
. Those symlinks end up pointing to/dev/pts/0
. When we setLogFile /dev/pts/0
in the config we get:The underlying cause is that the
clamav
user isn't a member of thetty
group, which owns/dev/pts/0
. Only users in thetty
group can write to that file descriptor:I suggest that the
adduser
in the Dockerfile (clamav-docker/clamav/1.4/alpine/Dockerfile
Line 115 in fdb02aa
tty
group to theclamav
user so that people can set stdout / stderr to be the LogFile in the config.The text was updated successfully, but these errors were encountered: