Opened 6 years ago
Last modified 5 months ago
#7449 assigned defect
TorBrowser creates temp files in Linux /tmp & Windows %temp% and OSX(various places) during the file downloads dialog & when using internal browser video player
Reported by: | unknown | Owned by: | tbb-team |
---|---|---|---|
Priority: | High | Milestone: | |
Component: | Applications/Tor Browser | Version: | |
Severity: | Normal | Keywords: | tbb-disk-leak, tbb-firefox-patch |
Cc: | gk, brade, mcs | Actual Points: | |
Parent ID: | Points: | ||
Reviewer: | Sponsor: |
Description
- Open a webpage with downloadable links (http://arxiv.org/abs/1207.5216 for example).
- Select file to download (pdf for example: http://arxiv.org/pdf/1207.5216v2).
- See the dialog:
External application is needed to handle
with two buttons:launch
andcancel
. - Only launch is available to start download. Select it.
- Second dialog asks to open with
/usr/bin/xpdf (default)
orSave
. - Don't press
Save
immediately. See in a terminal random name of file, sometimes with a part of contents:ls -la /tmp $ file /tmp/oeXvw4D+.pdf.part /tmp/oeXvw4D+.pdf.part: PDF document, version 1.5
Tbb ignoredtor-browser_en-US/tmp
and use system /tmp - After pressing
Save
file removed from /tmp.
This behaviour potentially affects users local anonimity with unencrypted and non-attached to memory system /tmp dirs; and affects users with portable TorBrowser versions. Partially downloaded files will saved in /tmp in the cases of TBB crushes or not completely erased. Will be preferably to isolate TorBrowser activity in user local catalogs only.
Child Tickets
Ticket | Status | Owner | Summary | Component |
---|---|---|---|---|
#11254 | new | tbb-team | Tor Browser bundle v3.5 fails to clean up cancelled downloads in Temp folder | Applications/Tor Browser |
Attachments (1)
Change History (21)
comment:1 Changed 6 years ago by
Keywords: | tbb-disk-leak added |
---|
comment:2 Changed 6 years ago by
Cc: | g.koppen@… added |
---|
comment:3 Changed 6 years ago by
comment:4 Changed 6 years ago by
Unadequate kludges.
3.3. Disk Avoidance Design Goal: Tor Browser MUST (at user option) prevent all disk records of browser activity.
comment:5 Changed 6 years ago by
Status: | new → needs_revision |
---|
Actually, I think the two or three dialogs that we and Firefox throw up in the face of the user before saving a downloaded file satisfy the "at user option" bit of that goal. Changing the TEMP env var seems like a good plan to me.
But, how about a patch that works on all three platforms, though? Does that mean we should patch Vidalia, or can we set the equivalent env vars in the start exe/start app for Win+MacOS?
Changed 5 years ago by
Image of tor creating files in global temp directory
comment:6 Changed 5 years ago by
According to Design Document of the TorBrowser.
"The browser MUST NOT write any information that is derived from or that reveals browsing activity to the disk, or store it in memory beyond the duration of one browsing session, unless the user has explicitly opted to store their browsing history information to disk."
---
I can confirm this bug and the above principle are violated in windows 7 64bit by following steps 1-4, with the firefox 24 & tor browser bundle 3.5.1 and it has a related solution. Ensure the enviroment has the TEMP/TMP enviromental variable are set properly for each os to point to a relative directory and that the application honors that setting, and failing that, do not use api calls that create temp files that do not adhere to those enviromental variables. For my computer TEMP=C:\Users\tortestuser\AppData\Local\Temp according to Process Hacker, and that is where the files are created.
I have attached a picture (tor.png) with visual proof of the problem.
---
Edit: I also tested a batch file with the lines:
SET TEMP=T:\TEMP
"Start Tor Browser.exe"
And it succefully changed the enviroment variables used by tor.exe and firefox, but they were completely ignored and files continued to be saved to the %appdata%\temp folder, and mp4 videos to %AppData%\Temp\mozilla-temp-files\
So a fix needs to ensure both files downloaded and vidoes played in the browser are saved to the proper area.
comment:7 Changed 5 years ago by
Summary: | TorBrowser creates temp files in Linux /tmp during the file downloads dialog → TorBrowser creates temp files in Linux /tmp & Windows %temp% during the file downloads dialog |
---|
comment:8 Changed 5 years ago by
Summary: | TorBrowser creates temp files in Linux /tmp & Windows %temp% during the file downloads dialog → TorBrowser creates temp files in Linux /tmp & Windows %temp% during the file downloads dialog & when using internal browser video player |
---|
comment:9 Changed 5 years ago by
OSX
file downloads dialog ~/Downloads
video player ~/Library/Caches/TemporaryItems
comment:10 Changed 5 years ago by
Priority: | normal → major |
---|---|
Summary: | TorBrowser creates temp files in Linux /tmp & Windows %temp% during the file downloads dialog & when using internal browser video player → TorBrowser creates temp files in Linux /tmp & Windows %temp% and OSX(various places) during the file downloads dialog & when using internal browser video player |
comment:11 Changed 3 years ago by
Component: | Firefox Patch Issues → Tor Browser |
---|---|
Keywords: | tbb-firefox-patch added |
Severity: | → Normal |
Actual for 6.0a1
comment:12 Changed 3 years ago by
Cc: | gk added; g.koppen@… removed |
---|
comment:14 Changed 3 years ago by
Downloads are stored in $TMPDIR|$TMP|$TEMP|/tmp first and then moved to
Reported: 2001-02-23 00:26 PST
comment:15 Changed 3 years ago by
Cc: | brade mcs added |
---|
comment:17 Changed 14 months ago by
It is still present. File created in TBB 7.0.11: /tmp/mozilla_USER0/5wcXcSTV.pdf.part, where USER is ${USER} which runs TBB.
comment:18 Changed 13 months ago by
When downloading using browser.altClickSave function no temp file is created in TBB or Firefox. Perhaps this function could be used in all file downloads in some way.
browser.altClickSave function can only be used on direct links. It is not enabled by default in TBB (or Firefox). You have to enable it in about:config.
comment:19 Changed 8 months ago by
Owner: | changed from mikeperry to tbb-team |
---|---|
Status: | needs_revision → assigned |
We got a report from Scott Ainsile on our HackerOne platform that this is still happening on a Ubuntu 16.04.4 system:
I noticed that a lot of the artefacts originate from Twitter and Tumblr and are MPEG-4 Part 14 digital multimedia container format and WebM audiovisual media file format artefacts.
comment:20 Changed 5 months ago by
Confirm this bug for TBB 8.0.1. Temporary file is /tmp/mozilla_${USER}0/uIqt+p0F.pdf.part
.
A simple patch to the start script seems to be adequate solution: