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] memory leak in tcpprep with using include/exclude #869

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

[Bug] memory leak in tcpprep with using include/exclude #869

fklassen opened this issue Jun 5, 2024 · 1 comment
Labels

Comments

@fklassen
Copy link
Member

fklassen commented Jun 5, 2024

Describe the bug
Memory leak in tcprep when using include or exclude options

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 -c '96.17.211.0/24' --exclude 'P:61-65,88-91' '

Expected behavior
no failed tests

Screenshots
❯ tcpprep -i ../test/test.pcap -o /dev/null -c '96.17.211.0/24' --exclude 'P:61-65,88-91'

=================================================================
==528235==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0xffffa7dca2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0xaaaae77ce578 in our_safe_malloc ../../../src/common/utils.c:42
#2 0xaaaae77ca1a0 in new_list ../../../src/common/list.c:43
#3 0xaaaae77ca48c in parse_list ../../../src/common/list.c:83
#4 0xaaaae77cde3c in parse_xX_str ../../../src/common/xX.c:82
#5 0xaaaae77bff14 in doOptExclude /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1463
#6 0xaaaae77d3b60 in handle_opt ../../libopts/autoopts.c:200
#7 0xaaaae77e76ac in regular_opts ../../libopts/autoopts.c:264
#8 0xaaaae77ef9d8 in optionProcess ../../libopts/autoopts.c:348
#9 0xaaaae77c0b3c in main ../../src/tcpprep.c:81
#10 0xffffa7aa73f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#11 0xffffa7aa74c8 in __libc_start_main_impl ../csu/libc-start.c:392
#12 0xaaaae77bf3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
#0 0xffffa7dca2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0xaaaae77ce578 in our_safe_malloc ../../../src/common/utils.c:42
#2 0xaaaae77ca1a0 in new_list ../../../src/common/list.c:43
#3 0xaaaae77ca6cc in parse_list ../../../src/common/list.c:116
#4 0xaaaae77cde3c in parse_xX_str ../../../src/common/xX.c:82
#5 0xaaaae77bff14 in doOptExclude /home/parallels/git/tcpreplay/build/src/tcpprep_opts.c:1463
#6 0xaaaae77d3b60 in handle_opt ../../libopts/autoopts.c:200
#7 0xaaaae77e76ac in regular_opts ../../libopts/autoopts.c:264
#8 0xaaaae77ef9d8 in optionProcess ../../libopts/autoopts.c:348
#9 0xaaaae77c0b3c in main ../../src/tcpprep.c:81
#10 0xffffa7aa73f8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#11 0xffffa7aa74c8 in __libc_start_main_impl ../csu/libc-start.c:392
#12 0xaaaae77bf3ec in _start (/home/parallels/git/tcpreplay/build/src/tcpprep+0xf3ec)

SUMMARY: AddressSanitizer: 48 byte(s) leaked in 2 allocation(s).

System (please complete the following information):

  • OS: Linux
  • OS version: Debian 11
  • Tcpreplay Version: 4.5.0-beta1
@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 added a commit that referenced this issue Jun 5, 2024
…lude_exclude

Bug #869 tcpprep memory leak include exclude
@fklassen
Copy link
Member Author

fklassen commented Jun 5, 2024

Resolved in PR #870

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