Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] tcpprep memory leak when using Regex #867

Closed
fklassen opened this issue Jun 4, 2024 · 1 comment
Closed

[Bug] tcpprep memory leak when using Regex #867

fklassen opened this issue Jun 4, 2024 · 1 comment
Assignees
Labels

Comments

@fklassen
Copy link
Member

fklassen commented Jun 4, 2024

Describe the bug
Memory leak in tcpprep when using regex

To Reproduce
Steps to reproduce the behavior:

  1. ../configure --with-testnic=enp0s5 --with-testnic2=enp0s5 --enable-asan
  2. make
  3. tcpprep -i ../test/test.pcap -o /dev/null -r '96.17.211.*'

Expected behavior
no failed tests

Screenshots

src/tcpprep -i ../test/test.pcap -o /dev/null -r '96.17.211.*' 

=================================================================
==488204==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805acb84 in __GI___regcomp posix/regcomp.c:472
    #2 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #3 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #4 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #5 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #6 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #7 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #8 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #9 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #10 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Direct leak of 224 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a69c in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0xffff805ac490 in re_compile_internal posix/regcomp.c:750
    #2 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #3 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #4 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #5 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #6 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #7 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #8 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #9 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #10 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #11 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 18432 byte(s) in 9 object(s) allocated from:
    #0 0xffff8082a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xffff805a7164 in build_trtable posix/regexec.c:3367
    #2 0xffff805a8680 in transit_state posix/regexec.c:2257
    #3 0xffff805a8680 in check_matching posix/regexec.c:1120
    #4 0xffff805a8680 in re_search_internal posix/regexec.c:792
    #5 0xffff805acf04 in __GI___regexec posix/regexec.c:219
    #6 0xffff807d05f8 in __interceptor_regexec ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7757
    #7 0xaaaaba85215c in check_ipv4_regex ../../src/tcpprep.c:292
    #8 0xaaaaba85215c in process_raw_packets ../../src/tcpprep.c:418
    #9 0xaaaaba85215c in main ../../src/tcpprep.c:146
    #10 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #12 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 792 byte(s) in 9 object(s) allocated from:
    #0 0xffff8082a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xffff805a373c in create_cd_newstate posix/regex_internal.c:1687
    #2 0xffff805a373c in re_acquire_state_context posix/regex_internal.c:1562
    #3 0xffff805a70dc in build_trtable posix/regexec.c:3331
    #4 0xffff805a8680 in transit_state posix/regexec.c:2257
    #5 0xffff805a8680 in check_matching posix/regexec.c:1120
    #6 0xffff805a8680 in re_search_internal posix/regexec.c:792
    #7 0xffff805acf04 in __GI___regexec posix/regexec.c:219
    #8 0xffff807d05f8 in __interceptor_regexec ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7757
    #9 0xaaaaba85215c in check_ipv4_regex ../../src/tcpprep.c:292
    #10 0xaaaaba85215c in process_raw_packets ../../src/tcpprep.c:418
    #11 0xaaaaba85215c in main ../../src/tcpprep.c:146
    #12 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xffff805ab600 in init_dfa posix/regcomp.c:866
    #2 0xffff805ab600 in re_compile_internal posix/regcomp.c:758
    #3 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #4 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #5 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #6 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #7 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #8 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #9 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #10 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #12 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 192 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805ab5d4 in init_dfa posix/regcomp.c:859
    #2 0xffff805ab5d4 in re_compile_internal posix/regcomp.c:758
    #3 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #4 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #5 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #6 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #7 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #8 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #9 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #10 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #12 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 192 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805ab8f4 in analyze posix/regcomp.c:1171
    #2 0xffff805ab8f4 in re_compile_internal posix/regcomp.c:795
    #3 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #4 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #5 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #6 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #7 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #8 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #9 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #10 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #12 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 192 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805ab904 in analyze posix/regcomp.c:1172
    #2 0xffff805ab904 in re_compile_internal posix/regcomp.c:795
    #3 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #4 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #5 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #6 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #7 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #8 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #9 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #10 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #12 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 128 byte(s) in 8 object(s) allocated from:
    #0 0xffff8082a69c in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0xffff805a363c in register_state posix/regex_internal.c:1598
    #2 0xffff805a3870 in create_cd_newstate posix/regex_internal.c:1746
    #3 0xffff805a3870 in re_acquire_state_context posix/regex_internal.c:1562
    #4 0xffff805a70dc in build_trtable posix/regexec.c:3331
    #5 0xffff805a8680 in transit_state posix/regexec.c:2257
    #6 0xffff805a8680 in check_matching posix/regexec.c:1120
    #7 0xffff805a8680 in re_search_internal posix/regexec.c:792
    #8 0xffff805acf04 in __GI___regexec posix/regexec.c:219
    #9 0xffff807d05f8 in __interceptor_regexec ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7757
    #10 0xaaaaba85215c in check_ipv4_regex ../../src/tcpprep.c:292
    #11 0xaaaaba85215c in process_raw_packets ../../src/tcpprep.c:418
    #12 0xaaaaba85215c in main ../../src/tcpprep.c:146
    #13 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #14 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #15 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xffff805a373c in create_cd_newstate posix/regex_internal.c:1687
    #2 0xffff805a373c in re_acquire_state_context posix/regex_internal.c:1562
    #3 0xffff805ac18c in create_initial_state posix/regcomp.c:1050
    #4 0xffff805ac18c in re_compile_internal posix/regcomp.c:806
    #5 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #6 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #7 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #8 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #9 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #10 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #11 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #12 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805ab8d4 in analyze posix/regcomp.c:1169
    #2 0xffff805ab8d4 in re_compile_internal posix/regcomp.c:795
    #3 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #4 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #5 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #6 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #7 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #8 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #9 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #10 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #12 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 44 byte(s) in 9 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805a3574 in re_node_set_alloc posix/regex_internal.c:973
    #2 0xffff805a3574 in register_state posix/regex_internal.c:1583
    #3 0xffff805a3870 in create_cd_newstate posix/regex_internal.c:1746
    #4 0xffff805a3870 in re_acquire_state_context posix/regex_internal.c:1562
    #5 0xffff805a70dc in build_trtable posix/regexec.c:3331
    #6 0xffff805a8680 in transit_state posix/regexec.c:2257
    #7 0xffff805a8680 in check_matching posix/regexec.c:1120
    #8 0xffff805a8680 in re_search_internal posix/regexec.c:792
    #9 0xffff805acf04 in __GI___regexec posix/regexec.c:219
    #10 0xffff807d05f8 in __interceptor_regexec ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7757
    #11 0xaaaaba85215c in check_ipv4_regex ../../src/tcpprep.c:292
    #12 0xaaaaba85215c in process_raw_packets ../../src/tcpprep.c:418
    #13 0xaaaaba85215c in main ../../src/tcpprep.c:146
    #14 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #15 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #16 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 44 byte(s) in 9 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805a2338 in re_node_set_init_copy posix/regex_internal.c:1034
    #2 0xffff805a3758 in create_cd_newstate posix/regex_internal.c:1690
    #3 0xffff805a3758 in re_acquire_state_context posix/regex_internal.c:1562
    #4 0xffff805a70dc in build_trtable posix/regexec.c:3331
    #5 0xffff805a8680 in transit_state posix/regexec.c:2257
    #6 0xffff805a8680 in check_matching posix/regexec.c:1120
    #7 0xffff805a8680 in re_search_internal posix/regexec.c:792
    #8 0xffff805acf04 in __GI___regexec posix/regexec.c:219
    #9 0xffff807d05f8 in __interceptor_regexec ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7757
    #10 0xaaaaba85215c in check_ipv4_regex ../../src/tcpprep.c:292
    #11 0xaaaaba85215c in process_raw_packets ../../src/tcpprep.c:418
    #12 0xaaaaba85215c in main ../../src/tcpprep.c:146
    #13 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #14 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #15 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 40 byte(s) in 10 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805a4ee4 in re_node_set_alloc posix/regex_internal.c:973
    #2 0xffff805a4ee4 in calc_eclosure_iter posix/regcomp.c:1699
    #3 0xffff805abe6c in calc_eclosure posix/regcomp.c:1677
    #4 0xffff805abe6c in analyze posix/regcomp.c:1204
    #5 0xffff805abe6c in re_compile_internal posix/regcomp.c:795
    #6 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #7 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #8 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #9 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #10 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #11 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #12 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #13 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #14 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #15 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a69c in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0xffff805a0308 in re_node_set_merge posix/regex_internal.c:1205
    #2 0xffff805a4f84 in calc_eclosure_iter posix/regcomp.c:1746
    #3 0xffff805abe6c in calc_eclosure posix/regcomp.c:1677
    #4 0xffff805abe6c in analyze posix/regcomp.c:1204
    #5 0xffff805abe6c in re_compile_internal posix/regcomp.c:795
    #6 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #7 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #8 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #9 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #10 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #11 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #12 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #13 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #14 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #15 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a69c in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0xffff805a363c in register_state posix/regex_internal.c:1598
    #2 0xffff805a3870 in create_cd_newstate posix/regex_internal.c:1746
    #3 0xffff805a3870 in re_acquire_state_context posix/regex_internal.c:1562
    #4 0xffff805ac18c in create_initial_state posix/regcomp.c:1050
    #5 0xffff805ac18c in re_compile_internal posix/regcomp.c:806
    #6 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #7 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #8 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #9 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #10 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #11 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #12 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #13 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #14 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #15 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805ac048 in re_node_set_init_2 posix/regex_internal.c:1001
    #2 0xffff805ac048 in link_nfa_nodes posix/regcomp.c:1457
    #3 0xffff805ac048 in preorder posix/regcomp.c:1265
    #4 0xffff805ac048 in analyze posix/regcomp.c:1201
    #5 0xffff805ac048 in re_compile_internal posix/regcomp.c:795
    #6 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #7 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #8 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #9 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #10 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #11 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #12 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #13 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #14 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #15 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805a4ee4 in re_node_set_alloc posix/regex_internal.c:973
    #2 0xffff805a4ee4 in calc_eclosure_iter posix/regcomp.c:1699
    #3 0xffff805a4fe0 in calc_eclosure_iter posix/regcomp.c:1739
    #4 0xffff805abe6c in calc_eclosure posix/regcomp.c:1677
    #5 0xffff805abe6c in analyze posix/regcomp.c:1204
    #6 0xffff805abe6c in re_compile_internal posix/regcomp.c:795
    #7 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #8 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #9 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #10 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #11 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #12 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #13 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #14 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #15 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #16 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805a2338 in re_node_set_init_copy posix/regex_internal.c:1034
    #2 0xffff805a3758 in create_cd_newstate posix/regex_internal.c:1690
    #3 0xffff805a3758 in re_acquire_state_context posix/regex_internal.c:1562
    #4 0xffff805ac18c in create_initial_state posix/regcomp.c:1050
    #5 0xffff805ac18c in re_compile_internal posix/regcomp.c:806
    #6 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #7 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #8 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #9 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #10 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #11 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #12 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #13 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #14 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #15 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0xffff8082a2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0xffff805a3574 in re_node_set_alloc posix/regex_internal.c:973
    #2 0xffff805a3574 in register_state posix/regex_internal.c:1583
    #3 0xffff805a3870 in create_cd_newstate posix/regex_internal.c:1746
    #4 0xffff805a3870 in re_acquire_state_context posix/regex_internal.c:1562
    #5 0xffff805ac18c in create_initial_state posix/regcomp.c:1050
    #6 0xffff805ac18c in re_compile_internal posix/regcomp.c:806
    #7 0xffff805acbe0 in __GI___regcomp posix/regcomp.c:491
    #8 0xffff807d0258 in __interceptor_regcomp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:7744
    #9 0xaaaaba850468 in doOptRegex /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1248
    #10 0xaaaaba863b34 in handle_opt ../../libopts/autoopts.c:200
    #11 0xaaaaba877680 in regular_opts ../../libopts/autoopts.c:264
    #12 0xaaaaba87f9ac in optionProcess ../../libopts/autoopts.c:348
    #13 0xaaaaba850b3c in main ../../src/tcpprep.c:81
    #14 0xffff805073f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #15 0xffff805074c8 in __libc_start_main_impl ../csu/libc-start.c:392
    #16 0xaaaaba84f3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

SUMMARY: AddressSanitizer: 20996 byte(s) leaked in 68 allocation(s).

System (please complete the following information):

  • OS: Linux
  • OS version: Debian 11
  • Tcpreplay Version: 4.5.0-beta1
@fklassen fklassen self-assigned this Jun 5, 2024
@fklassen fklassen added the bug label Jun 5, 2024
fklassen added a commit that referenced this issue Jun 5, 2024
fklassen added a commit that referenced this issue Jun 5, 2024
@fklassen
Copy link
Member Author

fklassen commented Jun 5, 2024

fixed by PR #868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant