tcpdump mailing list archives

Re: libpcap: fatal flex scanner internal error--end of buffer missed


From: ikuzar RABE <ikuzar9295 () gmail com>
Date: Tue, 7 Jun 2016 15:02:49 +0200

I catched the segfault with gdb. This time I put tcp as filter:

    Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff6125700 (LWP 5304)]
0x00007ffff772ddcb in pcap_lex () at scanner.c:3860
3860    scanner.c: No such file or directory.
(gdb) bt
#0  0x00007ffff772ddcb in pcap_lex () at scanner.c:3860
#1  0x00007ffff772e939 in pcap_parse () at y.tab.c:1978
#2  0x00007ffff771d6f5 in pcap_compile (p=0x12154300,
program=program@entry=0x7ffff6124dc0,
buf=0x7fffffffe270 "tcp", optimize=optimize@entry=0, mask=mask@entry=0)
    at ./gencode.c:463
#3  0x00000000004022ce in capture_packet (param=0xe20060) at
../src/capture.c:111
#4  0x00007ffff79540a4 in start_thread (arg=0x7ffff6125700) at
pthread_create.c:309
#5  0x00007ffff744804d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111


2016-06-06 18:16 GMT+02:00 ikuzar RABE <ikuzar9295 () gmail com>:

Hi all,

I work on Debian 8, with linux version 3.16.0-4-amd64, with flex
2.5.39-8+b1.
I wrote a C program which reads packets on one interface (NIC), then dumps
it into a pcap file. I usually use filter (vlan 1024) when I capture with
my program and it works fine with libpcap-1.3.0 (soname: libpcap.so.1) but
now, it does not with libpcap-1.6.2 (soname: libpcap.so.1).

NOTE: it still works without filter anyway

Whenever I run the program, I get one of the three result:
1) pcap file with nothing inside
2) segmentation fault
3) "fatal flex scanner internal error--end of buffer missed"


Did anyone alread encouter this problem ?

thanks for your help



_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: