Skip to content
Snippets Groups Projects
  1. Apr 10, 2019
    • Nick Mathewson's avatar
      Bump version to 0.4.0.4-rc · b2fc5742
      Nick Mathewson authored
      b2fc5742
    • Nick Mathewson's avatar
    • George Kadianakis's avatar
      Add changes file for #30040. · 2cdc6b20
      George Kadianakis authored
      2cdc6b20
    • Tobias Stoeckmann's avatar
      Prevent double free on huge files with 32 bit. · 9ce0bdd2
      Tobias Stoeckmann authored
      The function compat_getdelim_ is used for tor_getline if tor is compiled
      on a system that lacks getline and getdelim. These systems should be
      very rare, considering that getdelim is POSIX.
      
      If this system is further a 32 bit architecture, it is possible to
      trigger a double free with huge files.
      
      If bufsiz has been already increased to 2 GB, the next chunk would
      be 4 GB in size, which wraps around to 0 due to 32 bit limitations.
      
      A realloc(*buf, 0) could be imagined as "free(*buf); return malloc(0);"
      which therefore could return NULL. The code in question considers
      that an error, but will keep the value of *buf pointing to already
      freed memory.
      
      The caller of tor_getline() would free the pointer again, therefore
      leading to a double free.
      
      This code can only be triggered in dirserv_read_measured_bandwidths
      with a huge measured bandwith list file on a system that actually
      allows to reach 2 GB of space through realloc.
      
      It is not possible to trigger this on Linux with glibc or other major
      *BSD systems even on unit tests, because these systems cannot reach
      so much memory due to memory fragmentation.
      
      This patch is effectively based on the penetration test report of
      cure53 for curl available at https://cure53.de/pentest-report_curl.pdf
      and explained under section "CRL-01-007 Double-free in aprintf() via
      unsafe size_t multiplication (Medium)".
      9ce0bdd2
    • teor's avatar
  2. Apr 09, 2019
  3. Apr 08, 2019
    • Nick Mathewson's avatar
      Detect and suppress an additional gmtime() warning in test_util.c · a63bd877
      Nick Mathewson authored
      Fixes bug 29922; bugfix on 0.2.9.3-alpha when we tried to capture
      all these warnings.  No need to backport any farther than 0.3.5,
      though -- these warnings don't cause test failures before then.
      
      This one was tricky to find because apparently it only happened on
      _some_ windows builds.
      a63bd877
  4. Apr 06, 2019
  5. Apr 05, 2019
Loading