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
Potential Security Risk: /var/log/vmware-vmsvc.log is world readable #281
Comments
Additional related issue: There does not appear to be a configuration parameter available to set the default permissions for the vmware tools logs. This blocks securing the system by removing read permissions for users. What is the recommended way to do this ? |
Yes, there is no real reason for the service log file to be world-readable. You can safely make the log file user and group readable only. However, problem is vmtoolsd will continue to create new files with the same old permissions. So, you will have to have some script to keep fixing it periodically or have a power script to fix the file permissions during power on because that is when vmtoolsd will most likely be creating the new log file. Thanks for reporting this issue. I have filed an internal bug to fix it in a future release. |
@ravindravmw - thanks for the feedback on this. I think we have no choice but to wait for a future release, if we implement a script to modify the permissions, any potential exploit would simply take advantage of the intervals between. Therefore it would not mitigate a persistent threat. |
@archmangler I understand your concern. Actually, I forgot to mention another much better way to use till we fix this. Systemd allows you to define UMask for the service - https://www.freedesktop.org/software/systemd/man/systemd.exec.html. So, you could edit /usr/lib/systemd/system/vmtoolsd.service and add following line in the [Service] section: UMask=0027 This should make vmtoolsd.service create all files with no access to others. The only negative side effect is, if you have a need to create some world-readable file with vmtoolsd, that will no longer be possible. If you don't have such use case, then you should be able to use it as a workaround for the time being. NOTE: Replace 'vmtoolsd.service' with the appropriate service name in case of Ubuntu. |
Fixed in commit 8ffda7d |
We're currently going through the process of hardening linux systems to meet CIS Security Benchmark standards for Ubuntu Linux.
One of the items requires justification for permissions on logs under /var/log/*. I've noticed that vmware-vmsvc.log is world readable.
Is this a potential security risk, given that non-root users are able to browse this log and perhaps infer sensitive information from it? looking at the log, it does appear to contain a lot of information which could be used in combination with other sources to formulate an attack on a server.
Is there any documentation from regarding what the security best practice for these logs are? Specifically, why should it be world readable ? Can it be changed to user and group readable only?
Example below:
The text was updated successfully, but these errors were encountered: