-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CVE-2015-7529 - predictable tmp files usage #696
Comments
The following sequence of commits addresses this problem in master: 4a9b919 [sosreport] prepare report in a private subdirectory I'll leave this issue open for now until we've had time to coordinate with distributions and users to incorporate these changes. |
Assigning myself to track Ubuntu & Debian packaging |
FYI, upon normal completion, the private tmpdir is left empty in /tmp and not removed. Is this something we should worry about ? |
Urgh. This regressed when I did some 'safe' refactoring before pushing to master - now fixed in commit 08121d8, thanks! |
Updated packages with the fix for CVE-2015-7529 have been submitted to the Fedora updates system: Please test & comment or give karma in bhodi. |
Huh, thought GitHub allowed multiple assignments but apparently not; let's leave this unassigned for now. If particular distro maintainers need another place to track issues (other than the respective distro bugzilla) then we can open up new issues that reference this one. |
Please post links to other updated distro packages here - once we have things in motion for all the major ones we can close this tracker out. |
CVE uploaded to all Ubuntu supported releases : http://people.canonical.com/~ubuntu-security/cve/2015/CVE-2015-7529.html |
Turns out that Debian stable does not require the fix so all ends covered for Debian/Ubuntu |
Thanks @karibou! I think we have pretty much all the supported distros covered now - RHEL errata are on the way, Fedora 22, 23 and rawhide have the fix so I think we can close this out now unless there's something I've missed? Alternately we can keep this open until 3.3 is released - I put this back on hold over the break as I didn't think it was a good idea to drop a new upstream release when everyone was heading out for the break. If we have no other issues this week we should be in shape to make 3.3 final mid next week. |
Mateusz Guzik reports that sos-3.x is vulnerable to symbolic link attacks since it uses predictable temporary file names in the configured
--tmp-dir
location. If this location is shared with other users (the default on most distributions) then it is possible for a malicious user to obtain content from the archive and in some circumstances to execute arbitrary commands with administrative privileges.There are two recommended mitigations for these attacks:
Instead of using the default system temporary directory (
/tmp
,/var/tmp
) use a private directory that excludes non-administrative users from searching or reading the directory contents, e.g.:Note that the
chmod
is not strictly necessary assuming the root user's umask is set appropriately.Recent kernels support the
protected_symlinks
feature that can be used to mitigate this class of attack and this is enable by default by most distributions that support the feature:Note that relying on the
protect_symlinks
feature does not entirely eliminate risk: an attacker could create a regular file that they own (in place of the output file sos expects to create) and use this to obtain archive content that would not normally be exposed to their user and group ID.Users of sosreport are recommended to use an alternate
--tmp-dir
setting whenever possible.A fix for this problem is currently in master and will be included in the next sos release. This may be backported to earlier releases carried by distributions. Concerned users should contact their distribution's normal support channels for information regarding updated packages to fix this flaw.
The text was updated successfully, but these errors were encountered: