Skip to content
Snippets Groups Projects
  1. Jan 15, 2011
    • Nick Mathewson's avatar
      Fix a heap overflow found by debuger, and make it harder to make that mistake again · 115782bd
      Nick Mathewson authored
      Our public key functions assumed that they were always writing into a
      large enough buffer.  In one case, they weren't.
      
      (Incorporates fixes from sebastian)
      115782bd
    • Nick Mathewson's avatar
      Always nul-terminate the result passed to evdns_server_add_ptr_reply · a16902b9
      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.
      a16902b9
  2. 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
  3. Jan 10, 2011
  4. Jan 08, 2011
  5. Jan 07, 2011
  6. 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
  7. Jan 05, 2011
  8. Jan 03, 2011
  9. Dec 21, 2010
  10. Dec 17, 2010
  11. Dec 16, 2010
  12. Dec 13, 2010
  13. Dec 08, 2010
  14. Dec 01, 2010
  15. Nov 23, 2010
  16. Nov 21, 2010
  17. Nov 20, 2010
    • Nick Mathewson's avatar
      Do not send Libevent log messages to a controller (0.2.1 backport) · 668f7a26
      Nick Mathewson authored
      Doing so could make Libevent call Libevent from inside a Libevent
      logging call, which is a recipe for reentrant confusion and
      hard-to-debug crashes.  This would especially hurt if Libevent
      debug-level logging is enabled AND the user has a controller
      watching for low-severity log messages.
      
      Fix bug 2190; fix on 0.1.0.2-rc.
      668f7a26
  18. Nov 12, 2010
  19. Nov 11, 2010
  20. Nov 10, 2010
  21. Oct 04, 2010
  22. Sep 28, 2010
Loading