-
-
Notifications
You must be signed in to change notification settings - Fork 222
double free in DHT implementation? #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Another trace:
|
Running under valgrind: https://gist.github.com/slingamn/578793a4b7eeffd0a564daa707a2ac1b indicates that the following line is a source of use-after-frees: libtorrent/src/dht/dht_server.cc Line 638 in c167c5a
|
jesec
added a commit
to jesec/libtorrent
that referenced
this issue
May 23, 2022
Use-after-free occurs when the transaction ID is exhausted. As the ID only has one char, on an instance with many torrents, it is easy to exhaust the ID space, so that new transactions have to be discarded. However, The new transaction could be associated with an ongoing DhtSearch that does not expect transaction to be freed. Follow up of "dht_server: fix potential use-after-free" (1418bf9), properly fix the issue and deal with memory leak with this method. Bug: rakshasa/libtorrent#166, rakshasa/libtorrent#209, rakshasa/libtorrent#944
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
going through this line (I'm running a version based on c167c5a, including the patches from #134):
libtorrent/src/dht/dht_transaction.cc
Line 309 in c167c5a
The text was updated successfully, but these errors were encountered: