1. 29 Jan, 2018 1 commit
  2. 12 Dec, 2016 1 commit
  3. 11 Dec, 2016 1 commit
    • Anthony Ryan's avatar
      BEP7 remove IPv4 escaping · 267be8e2
      Anthony Ryan authored
      Fix for regression introduced in d0b7724f
      
      While some trackers automatically handle decoding encoded URL attributes
      others (primarily for performance reasons) stick very close to the spec.
      
      When implementing the &ipv4= parameter I mistakenly added encoding for
      symbols to IPv4 when BEP7 only specified that that should be the case
      for IPv6. IPv4 is meant to be sent without encoding according to BEP7
      and other client behaviour.
      267be8e2
  4. 15 Nov, 2016 1 commit
    • Jari Sundell's avatar
      Fix BEP7 compatibility with IPv6 trackers and IPv4 peers (#137) · c3c74f82
      Jari Sundell authored
      Currently the BEP7 code in tracker_http supports the case where
      a peer is IPv6 ready but the tracker is not, passing its IPv6 IP
      as an announce parameter. Unfortunately it does not yet support
      the case where both the peer and tracker are running in IPv6 mode
      but other peers in the swarm are not yet IPv6 capable. This sort
      of situation is occuring with increasing frequency now that IPv6
      adoption is taking off.
      
      To correct this, we are now going to send the IPv4 parameter to
      the tracker when connecting to the tracker over IPv6, implementing
      the remaining portion of this specification amendment.
      c3c74f82
  5. 14 Nov, 2016 1 commit
    • Anthony Ryan's avatar
      Fix BEP7 compatibility with IPv6 trackers and IPv4 peers · d0b7724f
      Anthony Ryan authored
      Currently the BEP7 code in tracker_http supports the case where
      a peer is IPv6 ready but the tracker is not, passing its IPv6 IP
      as an announce parameter. Unfortunately it does not yet support
      the case where both the peer and tracker are running in IPv6 mode
      but other peers in the swarm are not yet IPv6 capable. This sort
      of situation is occuring with increasing frequency now that IPv6
      adoption is taking off.
      
      To correct this, we are now going to send the IPv4 parameter to
      the tracker when connecting to the tracker over IPv6, implementing
      the remaining portion of this specification amendment.
      d0b7724f
  6. 13 Nov, 2016 2 commits
    • Anthony Ryan's avatar
      Drop packets everywhere we're deleting DhtTransaction's (#135) · bd3e2a5a
      Anthony Ryan authored
      This is a continuation of 856d9ca8
      
      I've observed at least two more behaviours where this deletion of
      the DhtTransaction within dht_server.cc can later lead to a use
      after free when attempting to process the associated packets.
      
      As such this commit updates all of the areas where we're deleting
      DhtTransactions to also drop the corresponding packets. While this
      arguably could be placed within the DhtTransactions' destructor, it
      feels like that would be messing up the hierarchy within the Dht*
      classes.
      bd3e2a5a
    • RealAlexJones's avatar
      Bug Fixes for 123,124,125,126,129 and 130 (#131) · 8d640352
      RealAlexJones authored
      * Fixed 129, checking peers6 with has_key_string
      
      * Fix for 123, setting limit on Transaction ID for DHT
      
      * Fix for 126 handling resizing exception
      
      * Fix for 125 throw if peer sent metadata_size 0
      
      * Fix for 124 don't throw internal error in bytes_left if left > 1<<60
      
      * Fix for 130, changed order of check in object_read_bencode_c
      
      * Added <stdexcept> for clang
      
      * Revert "Fix for 124 don't throw internal error in bytes_left if left > 1<<60"
      
      This reverts commit 592568ebd223e8393e3241a769ba079cdb47eaf7.
      
      * Restrict Transaction ID in DHT. Check length in create_error as well
      
      * Set upper bound of metadata size in DownloadMain::set_metadata_size
      
      * missed () in dht_server
      
      * Handle length check for raw_bencode and raw_string
      
      * only add tid in create_error if it's a raw string
      8d640352
  7. 04 Nov, 2016 1 commit
  8. 01 Nov, 2016 1 commit
  9. 31 Oct, 2016 1 commit
    • Joel Teichroeb's avatar
      Don't check the HAVE_CXX11 macro (#121) · 767f5d01
      Joel Teichroeb authored
      The macro only gets defined if C++11 is not required, however it
      is required. Instead check if we're using c++0x as that macro will
      be defined when using --enable-c++0x
      767f5d01
  10. 26 Oct, 2016 1 commit
    • Anthony Ryan's avatar
      Eliminate use-after-free in DHT Server (#120) · 856d9ca8
      Anthony Ryan authored
      Currently when a connection triggers a failed_transaction it gets
      deleted, which is the expected behavior. Unfortunately any packets
      left in the DHT packet priority queue will now have been free'd
      leading to a scenario where the process_queue is working on memory
      which may contain unpredictable data.
      
      The new behavior proposed by this patch is to also drop any queued
      packets to prevent future processing since we're throwing out that
      object for probelmatic behavior already.
      
      Notably this seems to reflect the same behavior seen in issue #68
      however I do not believe that to be a complete fix. It seems to
      decrease the probability of the issue occurring. I personally
      believe this fix should replace the one applied after #68 but am
      certainly open to further discussion on the matter.
      
      --------
      
      READ of size 4 thread 0 (rtorrent main)
      
      0. rak::socket_address_inet::address_n() const ../../rak/socket_address.h:167
      1. torrent::DhtTransaction::key(rak::socket_address const*, int) (/usr/lib64/libtorrent.so.19+0x2d9936)
      2. torrent::DhtTransaction::key(int) const (/usr/lib64/libtorrent.so.19+0x2d8d3f)
      3. torrent::DhtServer::process_queue(std::deque<torrent::DhtTransactionPacket*, std::allocator<torrent::DhtTransactionPacket*> >&, unsigned int*) libtorrent/src/dht/dht_server.cc:801
      4. torrent::DhtServer::event_write() libtorrent/src/dht/dht_server.cc:866
      5. torrent::PollEPoll::perform() libtorrent/src/torrent/poll_epoll.cc:190
      6. torrent::PollEPoll::do_poll(long, int) libtorrent/src/torrent/poll_epoll.cc:219
      7. torrent::thread_base::event_loop(torrent::thread_base*) libtorrent/src/torrent/utils/thread_base.cc:174
      8. main rtorrent/src/main.cc:867
      9. __libc_start_main (/lib64/libc.so.6+0x20733)
      10. _start (/usr/bin/rtorrent+0x9bce8)
      
      freed by thread 0 (rtorrent main) here:
      
      0. operator delete(void*) (/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libasan.so.1+0x62e47)
      1. torrent::DhtTransactionPing::~DhtTransactionPing() libtorrent/src/dht/dht_transaction.h:359
      2. torrent::DhtServer::failed_transaction(std::_Rb_tree_iterator<std::pair<unsigned long const, torrent::DhtTransaction*> >, bool) libtorrent/src/dht/dht_server.cc:672
      3. torrent::DhtServer::receive_timeout() libtorrent/src/dht/dht_server.cc:899
      4. std::tr1::_Mem_fn<void (torrent::DhtServer::*)()>::operator()(torrent::DhtServer*) const /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/tr1/functional:585
      5. std::tr1::result_of<std::tr1::_Mem_fn<void (torrent::DhtServer::*)()> (std::tr1::result_of<std::tr1::_Mu<torrent::DhtServer*, false, false> (torrent::DhtServer*,
      std::tr1::tuple<>)>::type)>::type std::tr1::_Bind<std::tr1::_Mem_fn<void (torrent::DhtServer::*)()> (torrent::DhtServer*)>::__call<, 0>(std::tr1::tuple<> const&,
      std::tr1::_Index_tuple<0>) /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/tr1/functional:1178
      6. std::tr1::result_of<std::tr1::_Mem_fn<void (torrent::DhtServer::*)()> (std::tr1::result_of<std::tr1::_Mu<torrent::DhtServer*, false, false> (torrent::DhtServer*,
      std::tr1::tuple<>)>::type)>::type std::tr1::_Bind<std::tr1::_Mem_fn<void (torrent::DhtServer::*)()> (torrent::DhtServer*)>::operator()<>()
      (/usr/lib64/libtorrent.so.19+0x2e1e5d)
      7. std::tr1::_Function_handler<void (), std::tr1::_Bind<std::tr1::_Mem_fn<void (torrent::DhtServer::*)()> (torrent::DhtServer*)> >::_M_invoke(std::tr1::_Any_data const&) /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/tr1/functional:1796
      8. std::tr1::function<void ()>::operator()() const (/usr/bin/rtorrent+0xa7b7b)
      9. torrent::thread_main::call_events() libtorrent/src/thread_main.cc:82
      10. torrent::thread_base::event_loop(torrent::thread_base*) libtorrent/src/torrent/utils/thread_base.cc:141
      11. main rtorrent/src/main.cc:867
      12. __libc_start_main (/lib64/libc.so.6+0x20733)
      13. _start (/usr/bin/rtorrent+0x9bce8)
      856d9ca8
  11. 23 Oct, 2016 2 commits
  12. 22 Oct, 2016 6 commits
  13. 19 Oct, 2016 4 commits
  14. 18 Oct, 2016 1 commit
  15. 10 Oct, 2016 2 commits
  16. 05 Sep, 2016 1 commit
  17. 29 Aug, 2016 1 commit
  18. 22 Aug, 2016 1 commit
  19. 21 Aug, 2016 1 commit
  20. 03 Aug, 2016 2 commits
  21. 19 Jun, 2016 2 commits
  22. 22 Mar, 2016 1 commit
  23. 16 Mar, 2016 2 commits
  24. 10 Mar, 2016 3 commits