Skip to content
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

Disable following symlinks when opening log files #1363

Merged

Conversation

micahsnyder
Copy link
Contributor

The log module used by clamd and freshclam may follow symlinks. This is a potential security concern since the log may be owned by the unprivileged service but may be opened by the service running as root on startup.

For Windows, we'll define O_NOFOLLOW so the code works, though the issue does not affect Windows.

Issue reported by Detlef.

Note: This is fixed in the recently released security patch versions: https://blog.clamav.net/2024/09/clamav-141-132-107-and-010312-security.html

The log module used by clamd and freshclam may follow symlinks.
This is a potential security concern since the log may be owned by
the unprivileged service but may be opened by the service running as
root on startup.

For Windows, we'll define O_NOFOLLOW so the code works, though the issue
does not affect Windows.

Issue reported by Detlef.
@micahsnyder micahsnyder merged commit c17a0c7 into Cisco-Talos:main Sep 4, 2024
23 of 24 checks passed
@micahsnyder micahsnyder deleted the CLAM-2634-unprivileged-logg branch September 4, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants