Segmentation fault in gnutella.c

14 views
Skip to first unread message

bary

unread,
Nov 29, 2009, 11:59:46 AM11/29/09
to opendpi
Hi,
there is a segmentation fault problem in gnutella module. I'm trying
to fix it.
If anyone has an idea about the problem !!

Best Regards




Starting program: /tmp/opendpi-1.1.1/src/examples/OpenDPI_demo/.libs/
OpenDPI_demo -f xx.pcap

Program received signal SIGSEGV, Segmentation fault.
0xb7edeba6 in ipoque_search_gnutella (ipoque_struct=0x9c44008) at
protocols/gnutella.c:136
warning: Source file is more recent than executable.
136 ipq_parse_packet_line_info
(ipoque_struct);

hgamal

unread,
Jan 14, 2010, 11:02:01 AM1/14/10
to opendpi
I had the same problem. I've tried to fix with the following patch.
Could anybody from the develop team check this patch?

--snip--snip--snip--snip--snip--snip--snip--snip--snip--snip--snip--
snip--snip--snip--snip--snip--snip--snip--
Index: ipq_main.c
===================================================================
--- ipq_main.c (revision 23)
+++ ipq_main.c (working copy)
@@ -1891,6 +1891,17 @@
packet->http_cookie.ptr = NULL;
packet->http_x_session_type.ptr = NULL;

+ packet->host_line.len = 0;
+ packet->content_line.len = 0;
+ packet->accept_line.len = 0;
+ packet->user_agent_line.len = 0;
+ packet->http_url_name.len = 0;
+ packet->http_encoding.len = 0;
+ packet->http_transfer_encoding.len = 0;
+ packet->http_contentlen.len = 0;
+ packet->http_cookie.len = 0;
+ packet->http_x_session_type.len = 0;
+
if (packet->payload_packet_len == 0)
return;

--snip--snip--snip--snip--snip--snip--snip--snip--snip--snip--snip--
snip--snip--snip--snip--snip--snip--snip--

Katrin.Pf...@ipoque.com

unread,
Jan 26, 2010, 3:31:33 AM1/26/10
to opendpi
Hi,

we want to take care of this problem. Is it possible that you send the
pcap to us that caused the segmentation fault?

Regards, Katrin

Martin Weiser

unread,
Mar 10, 2010, 4:29:10 AM3/10/10
to ope...@googlegroups.com
Hi,

a possible crash in the gnutella detection has been identified. The fix
for this issue was committed to the SVN repository and a patch based on
OpenDPI 1.1.1 is attached to this mail.

Best regards,
Martin


--
Martin Weiser | Software Developer | ipoque
Mozartstr. 3 | 04107 Leipzig | Germany
phone + 49-341 - 59 40 3 - 0 fax +49-341 59 40 3 - 019 | web www.ipoque.com
trade register Amtsgericht Leipzig HRB21462
Gesellschaft mit beschr�nkter Haftung (GmbH)
board Klaus Mochalski, Hendrik Schulze, Dr. Frank Stummer

Networkshop 38, Manchester, 30 March-1 April 2010
ISS World Europe, Prague, 2-4 June 2010

ipoque Executive Blog at http://blog.ipoque.com

gnutella.c.patch
Reply all
Reply to author
Forward
0 new messages