Closed Marsman1996 closed 1 year ago
Unable to recreate. What is your ./configure
command?
Here is my log:
$ ./configure --with-testnic=ens33
...
$ make
...
$ src/tcpprep --auto=bridge --pcap=$POC --cachefile=/dev/null
Fatal Error: Error opening file: invalid file capture length 264194, bigger than maximum of 262144
Closing as "Cannot reproduce" however I believe that whatever you are seeing may be fixed with #716.
Describe the bug The assertion
assert(l2len > 0);
in packet2tree() at tree.c is reachable when the user uses tcpprep to open a crafted pcap file. The variablel2len
is assigned in get_l2len_protocol() at get.c.https://github.com/appneta/tcpreplay/blob/09f07748dcabe3d58961f123f31dd0f75198a389/src/tree.c#L733-L746
However, when the
datalink
isDLT_RAW
orDLT_JUNIPER_ETHER
,l2len
is assigned with 0, and the assertion is triggered.https://github.com/appneta/tcpreplay/blob/09f07748dcabe3d58961f123f31dd0f75198a389/src/common/get.c#L268-L282
To Reproduce Steps to reproduce the behavior:
$ tcpprep --auto=bridge --pcap=$POC --cachefile=/dev/null
The POC file could be downloaded here:
POC_file
Expected behavior Program reports assertion failure and is terminated.
Screenshots
The GDB report:
System (please complete the following information):