Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5426 closed Bug (fixed)

Crash when adding UDP tracker with a large number of characters in the tracker URL

Reported by: cfpp2p Owned by: jordan
Priority: High Milestone: 2.82
Component: libtransmission Version: 2.80
Severity: Normal Keywords:
Cc:

Description

udp://open.demAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAonii.com:1337

adding this tracker to any torrent crashes transmission

see #5424

Attachments (2)

5424.patch (1.6 KB) - added by cfpp2p 9 years ago.
5424-block256.patch (1.7 KB) - added by cfpp2p 9 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 9 years ago by jordan

This is a libevent bug. I've got a fix for it and will pass it upstream.

Changed 9 years ago by cfpp2p

comment:2 Changed 9 years ago by cfpp2p

Until the upstream fix is available here is a patch that eliminates the crash. Doing so by qualifying invalid any udp tracker urls with more than 63 characters in any period (DOT) delineated subD(N)

udp://subD(1) . subD(2) . subD(3 ). ------- . subD(n)

Changed 9 years ago by cfpp2p

comment:3 Changed 9 years ago by cfpp2p

Patch updated. Also needed to invalidate udp trackers with greater than 256 characters after the protocol

comment:4 Changed 9 years ago by jordan

This is a nice start!

I think there is a cleaner way to do this though, we appear to be requesting the cname but never useit. The cname's a trigger for the crash, so we can remove two bugs (the crash + unnecessary work) by not requesting it :)

comment:5 Changed 9 years ago by jordan

  • Component changed from Transmission to libtransmission
  • Milestone changed from None Set to 2.82
  • Owner set to jordan
  • Status changed from new to assigned

Fixed in r14135

comment:6 Changed 9 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:7 Changed 9 years ago by henryhog

Why did you close my report and create the exact duplicate of your own?

https://trac.transmissionbt.com/ticket/5424

Then claim mine was a duplicate?

comment:8 Changed 9 years ago by Robby

I suppose when they filed this ticket they weren't aware of the fact. And by the time they noticed they had already attached a patch to their (this) ticket

comment:9 Changed 9 years ago by cfpp2p

Why did you close my report and create the exact duplicate of your own?

https://trac.transmissionbt.com/ticket/5424

Then claim mine was a duplicate?

. Please let me try to explain.

I created this ticket when analyzing #5424 and by doing so determined that the crash occurred whether a tracker was either added or edited for an existing torrent, included in a .torrent file being added or in a magnet link. The patch I tested eliminated the crash in all of these circumstances. The root problem for all of the crashes was identical and rather than create at least two more trac tickets for each and every way the bug could crash transmission I tried to create and explain in one ticket the root problem, and not have multiple duplicate tickets all with the same fix in the end. I apologize for any misunderstandings here and hope you might be satisfied with my explanation.

Note: See TracTickets for help on using tickets.