Skip to content
Snippets Groups Projects
  1. Feb 08, 2011
  2. Jan 26, 2011
  3. Jan 20, 2011
  4. Jan 19, 2011
  5. Jan 16, 2011
  6. Jan 15, 2011
  7. Jan 12, 2011
    • Nick Mathewson's avatar
      Make our replacement INT32_MAX always signed · 9fcc1422
      Nick Mathewson authored
      The C standard says that INT32_MAX is supposed to be a signed
      integer.  On platforms that have it, we get the correct
      platform-defined value.  Our own replacement, however, was
      unsigned.  That's going to cause a bug somewhere eventually.
      9fcc1422
  8. Jan 10, 2011
    • Nick Mathewson's avatar
      Always nul-terminate the result passed to evdns_server_add_ptr_reply · bd67b23f
      Nick Mathewson authored
      In dnsserv_resolved(), we carefully made a nul-terminated copy of the
      answer in a PTR RESOLVED cell... then never used that nul-terminated
      copy.  Ouch.
      
      Surprisingly this one isn't as huge a security problem as it could be.
      The only place where the input to dnsserv_resolved wasn't necessarily
      nul-terminated was when it was called indirectly from relay.c with the
      contents of a relay cell's payload.  If the end of the payload was
      filled with junk, eventdns.c would take the strdup() of the name [This
      part is bad; we might crash there if the cell is in a bad part of the
      stack or the heap] and get a name of at least length
      495[*]. eventdns.c then rejects any name of length over 255, so the
      bogus data would be neither transmitted nor altered.
      
        [*] If the name was less than 495 bytes long, the client wouldn't
           actually be reading off the end of the cell.
      
      Nonetheless this is a reasonably annoying bug.  Better fix it.
      
      Found while looking at bug 2332, reported by doorss.  Bugfix on
      0.2.0.1-alpha.
      bd67b23f
    • Nick Mathewson's avatar
      Impose maximum sizes on parsed objects · 373a1bc4
      Nick Mathewson authored
      An object, you'll recall, is something between -----BEGIN----- and
      -----END----- tags in a directory document.  Some of our code, as
      doorss has noted in bug 2352, could assert if one of these ever
      overflowed SIZE_T_CEILING but not INT_MAX.  As a solution, I'm setting
      a maximum size on a single object such that neither of these limits
      will ever be hit.  I'm also fixing the INT_MAX checks, just to be sure.
      373a1bc4
    • Nick Mathewson's avatar
      Add logic in routerparse to not read overlong private keys · 729f404e
      Nick Mathewson authored
      I am not at all sure that it is possible to trigger a bug here,
      but better safe than sorry.
      729f404e
    • Karsten Loesing's avatar
  9. Jan 08, 2011
  10. Jan 07, 2011
  11. Jan 06, 2011
    • Nick Mathewson's avatar
      d6b49c55
    • Nick Mathewson's avatar
      Notice a little faster if we're running out of virtual addresses · 2008728d
      Nick Mathewson authored
      We were not decrementing "available" every time we did
      ++next_virtual_addr in addressmap_get_virtual_address: we left out the
      --available when we skipped .00 and .255 addresses.
      
      This didn't actually cause a bug in most cases, since the failure mode
      was to keep looping around the virtual addresses until we found one,
      or until available hit zero.  It could have given you an infinite loop
      rather than a useful message, however, if you said "VirtualAddrNetwork
      127.0.0.255/32" or something broken like that.
      
      Spotted by cypherpunks
      2008728d
  12. Jan 05, 2011
  13. Jan 03, 2011
Loading