Hello,
I ran into a seg fault when trying to capture cisco hdlc packets with
tethereal. The problem is from this code in packet-frame.c:dissect_frame:
pinfo->p2p_dir = pinfo->pseudo_header->p2p.sent ? P2P_DIR_SENT :
P2P_DIR_RECV;
Unfortunately, pseudo_header is set to NULL.
The backtrace is this:
#0 0x000773a4 in dissect_frame (tvb=0x3b9b90, pinfo=0x3b9ad8, tree=0x0)
at packet-frame.c:79
#1 0x0018b264 in call_dissector (handle=0x355f60, tvb=0x3b9b90,
pinfo=0x3b9ad8, tree=0x0) at packet.c:1067
#2 0x0018a304 in dissect_packet (edt=0x3b9ad0, pseudo_header=0x0,
pd=0x3b9a80 "\017", fd=0xffbee9d0, cinfo=0x350350) at packet.c:287
#3 0x00188a8c in epan_dissect_run (edt=0x3b9ad0, pseudo_header=0x0,
data=0x3b9a80 "\017", fd=0xffbee9d0, cinfo=0x350350) at epan.c:98
#4 0x00178594 in wtap_dispatch_cb_print (user=0x340234 "", phdr=0xffbeea88,
offset=0, pseudo_header=0x0, buf=0x3b9a80 "\017") at tethereal.c:1415
#5 0x00177e28 in capture_pcap_cb (user=0x32a098 "", phdr=0x3a3874,
pd=0x3b9a80 "\017") at tethereal.c:1085
#6 0x0019cd0c in pcap_read ()
#7 0x0019e250 in pcap_dispatch ()
#8 0x00177a54 in capture (packet_count=-1, out_file_type=3295292)
at tethereal.c:972
#9 0x001774d0 in main (argc=65536, argv=0x6) at tethereal.c:779
I couldn't find out where pseudo_header is supposed to be set, or why it's not
being set.
Anyway, please find a diff for checking the pseudo_header before this line.
Other than skipping the line I don't do anything else (which seems to lead to
happiness), but I feel that some more corrective action should be taken.
--
Aamer Akhter / aa@xxxxxxxxx
NSITE - cisco Systems
Attachment:
my.patch
Description: Binary data