Comment 6 for bug 1933832

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

The problem here is that while apport runs as the user and attach_file is being run with appropriate privileges, whoopsie is being run as root. When most of the hooks were written, it was assumed that they would be run unprivileged.

I think we should handle this in apport itself by modifying attach_file to perform the following checks:

1- If running as root, check if the file is world-readable, if not, don't attach it
2- Don't follow symlinks
3- Strip directory traversal strings like /./ and /../

This would allow us to fix the issue in apport itself and not have to fix every instance of attach_file in every package.

Thoughts?