Bug0065

Description
SEGV in PCAP parsing (0.85/0.84RC4)

When attemping to load a PCAP the following backtrace occured

From Al's stable version

pyflag0.85 //#define VERSION "0.84RC4"

[Thread -1247503440 (LWP 27474) exited]
[New Thread -1247503440 (LWP 27475)]
27440(Infomation): 192.168.3.210 - - [18/Dec/2007 14:45:19] "GET /f?case=Calf&iosource=2007_4_20_pcap&fstype=PCAP+Filesystem&mount_point=%2F2007_4_27&report=LoadFS&family=Load+Data&time=1197949515.84&__py flag_parent=main&__pyflag_name=main HTTP/1.1" 200 -

[Thread -1247503440 (LWP 27475) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1238938704 (LWP 27462)]
0x080d67ad in PyModule_AddStringConstant ()
(gdb) bt
#0  0x080d67ad in PyModule_AddStringConstant ()
#1  0x080d6c0d in Py_VaBuildValue ()
#2  0x080d6d46 in Py_BuildValue ()
#3  0xb7321a96 in encode_property (packet=<value optimized out>, p=0xce06feb7) at pypacket.c:149
#4  0x080b3854 in PyEval_EvalFrame ()
#5  0x080b781f in PyEval_EvalCodeEx ()
#6  0x080fc13d in PyFunction_SetClosure ()
#7  0x0805cdfc in PyObject_CallFunction ()
#8  0xb7346f3b in callback (self=0x8443720, dissected=0xb6a914e0) at reassembler.c:108
#9  0xb7347855 in pad_to_first_packet (self=0x8443720) at tcp.c:70
#10 0xb73478da in pad_data (self=0x8443720) at tcp.c:246
#11 0xb7347c1f in TCPStream_flush (this=0x843b760) at tcp.c:264
#12 0xb734e1a7 in _talloc_free (ptr=0x843b760) at talloc.c:373
#13 0xb734e08c in _talloc_free (ptr=0x836bc80) at talloc.c:404
#14 0xb73472cf in Reassembler_dealloc (self=0xb7da45b0) at reassembler.c:191
#15 0x080fa67e in PyGen_New ()
#16 0x080b7395 in PyEval_EvalCodeEx ()
#17 0x080b7093 in PyEval_EvalFrame ()
#18 0x080b713b in PyEval_EvalFrame ()
#19 0x080b781f in PyEval_EvalCodeEx ()
#20 0x080fc13d in PyFunction_SetClosure ()
#21 0x0805946c in PyObject_Call ()
#22 0x080b4bba in PyEval_EvalFrame ()
#23 0x080b713b in PyEval_EvalFrame ()
#24 0x080b781f in PyEval_EvalCodeEx ()
#25 0x080fc13d in PyFunction_SetClosure ()
#26 0x0805946c in PyObject_Call ()
#27 0x0805f005 in PyMethod_New ()
#28 0x0805946c in PyObject_Call ()
#29 0x080b0583 in PyEval_CallObjectWithKeywords ()
#30 0x080e074d in _PyObject_GC_NewVar ()
#31 0xb7f07341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#32 0xb7e734ee in clone () from /lib/tls/i686/cmov/libc.so.6

I'm trying the latest darcs version but am running into other bugs. If I get the same problem on the latest version I'll tell you.

Logged
2007-12-18
Logged By

DanBlack

Assigned to
Status
Closed

Get back to the BugIndex


Dan, can you test with the release version? I fixed a couple of nasty segv bugs to do with endianess and 64bit/32bit issues. If you still have problems I would appreciate if you can compile pyflag with CFLAGS="-g -O0 -Wall" and redo the bt

Im going to close this bug as it looks similar to another one I fixed. Please re-open if its not fixed yet in darcs.