aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Crash: wxFail in CUpDownClient::ProcessPublicKeyPacket()  (Read 3305 times)

Lotta

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 10
Crash: wxFail in CUpDownClient::ProcessPublicKeyPacket()
« on: April 15, 2016, 05:25:10 PM »

Hi!

I just posted a backtrace in http://forum.amule.org/index.php?topic=21315.0 due to a crash, which I can reproduce also with aMule-SVN-r10915 (from tarball).

wxFail is raised in CUpDownClient::ProcessPublicKeyPacket() because
        nSize > 250
and
        pachPacket[0] != nSize-1
and surely it's not an accident that nSize-1-pachPacket[0] turns out to be 256 in this case.

Anything known about this erroneous setting of bit 8 in nSize?

Logged

Lotta

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 10
Re: Crash: wxFail in CUpDownClient::ProcessPublicKeyPacket()
« Reply #1 on: April 16, 2016, 02:07:15 AM »

Actually, it's even in the logs:

.2016-04-15 17:02:23: ClientTCPSocket.cpp(1969): Remote Client Protocol: Packet with protocol c5, opcode 85, size 421 received from ...

But statistics indicate that for protocol c5 (OP_EMULEPROT) and opcode 85 (OP_PUBLICKEY) the size should always be 77. And also according to the source, size 421 (which agrees with the size given in the packet header) definitely isn't allowed for this type of packet. Brief, some remote client sends a malformed packet with protocol c5, opcode 85.

Question to the adepts: What should be done with such a defective packet? How to discard it cleanly?
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Crash: wxFail in CUpDownClient::ProcessPublicKeyPacket()
« Reply #2 on: May 06, 2016, 10:37:59 PM »

Should be fixed now by revision 10922.
Logged
concordia cum veritate