Attached is a patch that has been committed upstream to head: https://github.com/rakshasa/libtorrent/pull/99/files Tested and stable on 11.1-RELEASE-p1 / amd64 for a month, eliminates frequent crashes.
Created attachment 189192 [details] patch
A commit references this bug: Author: dbaio Date: Sat Feb 10 21:45:06 UTC 2018 New revision: 461436 URL: https://svnweb.freebsd.org/changeset/ports/461436 Log: security/vuxml: Document vulnerability in net-p2p/libtorrent PR: 224664 Reported by: Henry David Bartholomew <PopularMoment@protonmail.com> Changes: head/security/vuxml/vuln.xml
A commit references this bug: Author: dbaio Date: Sat Feb 10 21:52:46 UTC 2018 New revision: 461437 URL: https://svnweb.freebsd.org/changeset/ports/461437 Log: net-p2p/libtorrent: Fix remote DoS Calls into build_benocde that use %zu could crash on 64 bit machines due to the size change of size_t. Someone can force READ_ENC_IA to fail allowing an internal_error to be thrown and bring down the client, throw handshake_error instead. PR: 224664 Submitted by: Henry David Bartholomew <PopularMoment@protonmail.com> Approved by: maintainer timeout (pipfstarrd@openmailbox.org, > 2 weeks) MFH: 2018Q1 Security: e4dd787e-0ea9-11e8-95f2-005056925db4 Changes: head/net-p2p/libtorrent/Makefile head/net-p2p/libtorrent/distinfo head/net-p2p/libtorrent/files/patch-fix-build-bencoders-callers-crash
Committed, thanks! I'll leave this PR open, waiting approval for merging this patch into 2018Q1 branch.
Approved for merge
A commit references this bug: Author: dbaio Date: Sat Feb 10 23:15:47 UTC 2018 New revision: 461450 URL: https://svnweb.freebsd.org/changeset/ports/461450 Log: MFH: r461437 net-p2p/libtorrent: Fix remote DoS Calls into build_benocde that use %zu could crash on 64 bit machines due to the size change of size_t. Someone can force READ_ENC_IA to fail allowing an internal_error to be thrown and bring down the client, throw handshake_error instead. PR: 224664 Submitted by: Henry David Bartholomew <PopularMoment@protonmail.com> Approved by: maintainer timeout (pipfstarrd@openmailbox.org, > 2 weeks) Security: e4dd787e-0ea9-11e8-95f2-005056925db4 Approved by: ports-secteam (eadler) Changes: _U branches/2018Q1/ branches/2018Q1/net-p2p/libtorrent/Makefile branches/2018Q1/net-p2p/libtorrent/distinfo branches/2018Q1/net-p2p/libtorrent/files/patch-fix-build-bencoders-callers-crash
(In reply to Eitan Adler from comment #5) Thanks!