aMule Bug Tracker - aMule
View Issue Details
0001026aMuleExternal Connpublic2006-12-13 21:272008-02-22 03:21
quinox 
Xaignar 
normalcrashalways
resolvedfixed 
SVN 
SVN 
Any
0001026: aMuleD crash on a specific EC_OP_SEARCH_START packet
It is possible to crash aMuled by sending a specific EC_OP_SEARCH_START packet.

Still working on my own interface for aMule. Working with the protocol is nice and most things are logical, but aMule sure can't handle any unexpected problems:

On transmitting the search packet, aMule will go down with the following message:

amuled: ./libs/ec/ECTag.h:158: uint64_t CECTag::GetInt() const: Assertion `0' failed.
Aborted

This happens with CVS from 20061029 up to 20061211.
Hex dump of the evil packet

0000 00 00 00 20 00 00 00 51 ... ...Q
0008 26 00 4E 00 98 06 00 00 &.N.....
0010 00 06 71 75 65 72 79 00 ..query.
0018 00 9A 03 00 00 00 02 00 ........
0020 00 00 9C 06 00 00 00 01 ........
0028 00 00 9E 03 00 00 00 02 ........
0030 00 00 00 A0 03 00 00 00 ........
0038 02 00 00 00 A2 06 00 00 ........
0040 00 06 6C 6F 63 61 6C 00 ..local.
0048 00 A4 06 00 00 00 01 00 ........
0050 00 A6 03 00 00 00 02 00 ........
0058 00 .
No tags attached.
Issue History
2006-12-13 21:27quinoxNew Issue
2006-12-13 21:27quinoxOperating System => Any
2006-12-14 15:53KryNote Added: 0002190
2006-12-14 23:02quinoxNote Added: 0002191
2006-12-16 16:54KryNote Added: 0002192
2006-12-17 19:31quinoxNote Added: 0002198
2006-12-17 21:05KryNote Added: 0002200
2006-12-18 16:54quinoxNote Added: 0002201
2006-12-18 21:49KryNote Added: 0002202
2008-02-22 03:21XaignarStatusnew => resolved
2008-02-22 03:21XaignarFixed in Version => SVN
2008-02-22 03:21XaignarResolutionopen => fixed
2008-02-22 03:21XaignarAssigned To => Xaignar
2008-02-22 03:21XaignarNote Added: 0002648

Notes
(0002190)
Kry   
2006-12-14 15:53   
That's not an unhandled problem, it's a handled problem, actually :P That's why the assert is there. It's not a crash.
(0002191)
quinox   
2006-12-14 23:02   
OK, but aMule shouldn't go down because of it should it? Just ignoring the packet should be fine, perhaps with sending back an error
(0002192)
Kry   
2006-12-16 16:54   
don't compile on debug mode if you don't want debug behaviour?
(0002198)
quinox   
2006-12-17 19:31   
Unless CVS code has some debug turned on by default, I'm not:

  **** aMule Core ****
  Prefix where aMule should be installed? /home/quinox/chroot/
  Should aMule be compiled with i18n support? yes
  Should aMule be compiled in debug mode? no
  Should aMule be compiled with profiling? no
  Should aMule be compiled with optimizations? no
  Should aMule monolithic application be built? yes
  Should aMule daemon version be built? yes
  Should aMule remote gui be built? (EXPERIMENTAL) yes
(0002200)
Kry   
2006-12-17 21:05   
You have wx compiled with debug.
(0002201)
quinox   
2006-12-18 16:54   
Right, I'll look into that - I guess the problem isn't with aMule then, feel free to close this bug :)
(0002202)
Kry   
2006-12-18 21:49   
Nah... I'm leaving this around. Maybe some logging is betetr than an assert, but then again some hard debug is always welcome... I'll think about it.
(0002648)
Xaignar   
2008-02-22 03:21   
This situation has been improved in current SVN, where wxASSERT is now used instead of assert in EC code, allowing for aMule to continue running after an asserted has been triggered.