Skip to content

[Bug] Reachable abort in tcpprep, packet2tree, src/tree.c:746 #756

@5hadowblad3

Description

@5hadowblad3

Describe the bug
Hi, there.

There is a reachable abort in tcpprep, packet2tree, src/tree.c:746, in the newest commit 76644c2. This issue seems to be related with issue #715 .

To Reproduce
Steps to reproduce the behavior:

  1. compiled with
export CFLAGS="-fsanitize=address -g"
export CXXFLAGS="-fsanitize=address -g"
../configure --disable-local-libopts
  1. run
tcpprep --auto=bridge --cachefile=/dev/null --pcap=POC

POC.zip
(unzip first)

Expected behavior
Here is the traces reported by ASAN:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==1295229==ERROR: AddressSanitizer: ABRT on unknown address 0x03ea0013c37d (pc 0x7fa0750c800b bp 0x7fa07523d588 sp 0x7ffcf788e6b0 T0)
    #0 0x7fa0750c800b in raise /build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
    #1 0x7fa0750a7858 in abort /build/glibc-SzIz7B/glibc-2.31/stdlib/abort.c:79:7
    #2 0x7fa0750a7728 in __assert_fail_base /build/glibc-SzIz7B/glibc-2.31/assert/assert.c:92:3
    #3 0x7fa0750b8fd5 in __assert_fail /build/glibc-SzIz7B/glibc-2.31/assert/assert.c:101:3
    #4 0x50635a in packet2tree  /benchmark/tcpreplay/build-a/src/../../src/tree.c:746:5
    #5 0x50508c in add_tree_ipv4  /benchmark/tcpreplay/build-a/src/../../src/tree.c:545:15
    #6 0x4facf6 in process_raw_packets  /benchmark/tcpreplay/build-a/src/../../src/tcpprep.c:464:21
    #7 0x4facf6 in main  /benchmark/tcpreplay/build-a/src/../../src/tcpprep.c:144:23
    #8 0x7fa0750a9082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #9 0x41d57d in _start ( /benchmark/tcpreplay/build-a/src/tcpprep+0x41d57d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: ABRT /build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1 in raise
==1295229==ABORTING
Aborted

System (please complete the following information):

  • OS: Ubuntu
  • OS version: 20.04.5 LTS
  • Tcpreplay Version 4.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions