[tor-bugs] #9701 [Firefox Patch Issues]: Prevent TorBrowser from creating clipboardcache turds

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jun 6 05:54:54 UTC 2014


#9701: Prevent TorBrowser from creating clipboardcache turds
-------------------------------------+-------------------------------------
     Reporter:  cypherpunks          |      Owner:  mikeperry
         Type:  defect               |     Status:  needs_review
     Priority:  normal               |  Milestone:
    Component:  Firefox Patch        |    Version:
  Issues                             |   Keywords:  tbb-disk-leak,
   Resolution:                       |  interview, GeorgKoppen201405,
Actual Points:                       |  MikePerry201406R
       Points:                       |  Parent ID:
-------------------------------------+-------------------------------------

Comment (by michael):

 Replying to [comment:11 michael]:
 > DataStruct::WriteCache and nsIOutputStream::Write don't deallocate the
 memory in aData. If you look closely, nsMemory::Free(buff) only frees the
 'buff' memory that was deep copied from aData by
 nsPrimitiveHelpers::CreateDataFromPrimitive.
 >
 > Before proposing a preference, it might be wise to do a real world test
 to confirm this. If confirmed it makes no sense producing the cache disk
 files under any conditions (even the stock Firefox) whatsoever.
 >
 Unfortunately, a limited [1] black box test has confirmed the opposite of
 the hypothesis based on aData block code analysis. Basically, a prestine
 TBB 3.6.1 (which creates clipboardcache files) consumes no new memory when
 selecting >1Mo text:

 {{{
 pmap `pgrep firefox` >pmap1.txt
 echo 'Select text now...'
 pmap `pgrep firefox` >pmap2.txt
 diff pmap1.txt pmap2.txt
 }}}

 Testing a modified (with msvb-9701.diff) tor-browser build reveals
 additional memory use:

 {{{
 diff pmap3.txt pmap4.txt
 4a5
 > 00007f2962700000 131072K rw---   [ anon ]
 649c650
 <  total           771608K
 ---
 >  total           902680K
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9701#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list