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

rustc: Avoid /tmp/ in graphviz writing #52195

Merged
merged 1 commit into from
Jul 11, 2018
Merged

Conversation

alexcrichton
Copy link
Member

This issue was reported to [email protected] by Sebastien Marie following
our recent security advisory. Because /tmp is typically globally writable
it's possible for one user to place symlinks in /tmp pointing to files in
another user's directories, causing rustc to overwrite the contents of
innocent files by accident.

This patch instead defaults the output path here to the cwd which should avoid
this issue.

This issue was reported to [email protected] by Sebastien Marie following
our recent [security advisory][1]. Because `/tmp` is typically globally writable
it's possible for one user to place symlinks in `/tmp` pointing to files in
another user's directories, causing `rustc` to overwrite the contents of
innocent files by accident.

This patch instead defaults the output path here to the cwd which should avoid
this issue.

[1]: https://blog.rust-lang.org/2018/07/06/security-advisory-for-rustdoc.html
@rust-highfive
Copy link
Collaborator

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 9, 2018
@pnkfelix
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 10, 2018

📌 Commit bc09fcb has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 10, 2018
rustc: Avoid /tmp/ in graphviz writing

This issue was reported to [email protected] by Sebastien Marie following
our recent [security advisory][1]. Because `/tmp` is typically globally writable
it's possible for one user to place symlinks in `/tmp` pointing to files in
another user's directories, causing `rustc` to overwrite the contents of
innocent files by accident.

This patch instead defaults the output path here to the cwd which should avoid
this issue.

[1]: https://blog.rust-lang.org/2018/07/06/security-advisory-for-rustdoc.html
bors added a commit that referenced this pull request Jul 10, 2018
Rollup of 7 pull requests

Successful merges:

 - #51612 (NLL: fix E0594 "change to mutable ref" suggestion)
 - #51722 (Updated RELEASES for 1.28.0)
 - #52064 (Clarifying how the alignment of the struct works)
 - #52149 (Add #[repr(transparent)] to Atomic* types)
 - #52151 (Trait impl settings)
 - #52171 (Correct some codegen stats counter inconsistencies)
 - #52195 (rustc: Avoid /tmp/ in graphviz writing)

Failed merges:

 - #52164 (use proper footnote syntax for references)

r? @ghost
@bors bors merged commit bc09fcb into rust-lang:master Jul 11, 2018
@alexcrichton alexcrichton deleted the no-tmp branch July 18, 2018 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants