Actions
Bug #3455
closedasan ftp related leaks on the current gitmaster
Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:
Description
Seems related to - https://redmine.openinfosecfoundation.org/issues/3118
This is Suricata version 6.0.0-dev (d41aeccea 2020-01-28)
Direct leak of 1600 byte(s) in 50 object(s) allocated from:
#0 0x4cf5fa in calloc (/usr/bin/suricata+0x4cf5fa)
#1 0x6407b4 in FTPCalloc /opt/suricata/src/app-layer-ftp.c:220:11
#2 0x63aecc in FTPParseRequest /opt/suricata/src/app-layer-ftp.c:632:51
#3 0x6842d4 in AppLayerParserParse /opt/suricata/src/app-layer-parser.c:1239:13
#4 0x5362d0 in AppLayerHandleTCPData /opt/suricata/src/app-layer.c:661:17
#5 0xda45ef in ReassembleUpdateAppLayer /opt/suricata/src/stream-tcp-reassemble.c:1088:11
#6 0xda2fe8 in StreamTcpReassembleAppLayer /opt/suricata/src/stream-tcp-reassemble.c:1145:12
#7 0xdaa367 in StreamTcpReassembleHandleSegmentUpdateACK /opt/suricata/src/stream-tcp-reassemble.c:1719:9
#8 0xda9ff0 in StreamTcpReassembleHandleSegment /opt/suricata/src/stream-tcp-reassemble.c:1762:9
#9 0xd7e2ed in HandleEstablishedPacketToClient /opt/suricata/src/stream-tcp.c:2444:9
#10 0xd3f80f in StreamTcpPacketStateEstablished /opt/suricata/src/stream-tcp.c:2681:13
#11 0xd21979 in StreamTcpStateDispatch /opt/suricata/src/stream-tcp.c:4686:17
#12 0xd1804f in StreamTcpPacket /opt/suricata/src/stream-tcp.c:4875:13
#13 0xd22b1c in StreamTcp /opt/suricata/src/stream-tcp.c:5211:11
#14 0xacf447 in FlowWorker /opt/suricata/src/flow-worker.c:245:9
#15 0xdef066 in TmThreadsSlotVarRun /opt/suricata/src/tm-threads.c:129:17
#16 0xcd1c22 in TmThreadsSlotProcessPkt /opt/suricata/src/./tm-threads.h:163:9
#17 0xcc7335 in AFPParsePacketV3 /opt/suricata/src/source-af-packet.c:1130:9
#18 0xcc5887 in AFPWalkBlock /opt/suricata/src/source-af-packet.c:1146:15
#19 0xcb5636 in AFPReadFromRingV3 /opt/suricata/src/source-af-packet.c:1196:15
#20 0xcb1e2f in ReceiveAFPLoop /opt/suricata/src/source-af-packet.c:1589:17
#21 0xe04c30 in TmThreadsSlotPktAcqLoop /opt/suricata/src/tm-threads.c:355:13
#22 0x7ffae20e3fa2 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7fa2)
Indirect leak of 1247 byte(s) in 50 object(s) allocated from:
#0 0x4cf5fa in calloc (/usr/bin/suricata+0x4cf5fa)
#1 0x6407b4 in FTPCalloc /opt/suricata/src/app-layer-ftp.c:220:11
#2 0x63afb4 in FTPParseRequest /opt/suricata/src/app-layer-ftp.c:637:39
#3 0x6842d4 in AppLayerParserParse /opt/suricata/src/app-layer-parser.c:1239:13
#4 0x5362d0 in AppLayerHandleTCPData /opt/suricata/src/app-layer.c:661:17
#5 0xda45ef in ReassembleUpdateAppLayer /opt/suricata/src/stream-tcp-reassemble.c:1088:11
#6 0xda2fe8 in StreamTcpReassembleAppLayer /opt/suricata/src/stream-tcp-reassemble.c:1145:12
#7 0xdaa367 in StreamTcpReassembleHandleSegmentUpdateACK /opt/suricata/src/stream-tcp-reassemble.c:1719:9
#8 0xda9ff0 in StreamTcpReassembleHandleSegment /opt/suricata/src/stream-tcp-reassemble.c:1762:9
#9 0xd7e2ed in HandleEstablishedPacketToClient /opt/suricata/src/stream-tcp.c:2444:9
#10 0xd3f80f in StreamTcpPacketStateEstablished /opt/suricata/src/stream-tcp.c:2681:13
#11 0xd21979 in StreamTcpStateDispatch /opt/suricata/src/stream-tcp.c:4686:17
#12 0xd1804f in StreamTcpPacket /opt/suricata/src/stream-tcp.c:4875:13
#13 0xd22b1c in StreamTcp /opt/suricata/src/stream-tcp.c:5211:11
#14 0xacf447 in FlowWorker /opt/suricata/src/flow-worker.c:245:9
#15 0xdef066 in TmThreadsSlotVarRun /opt/suricata/src/tm-threads.c:129:17
#16 0xcd1c22 in TmThreadsSlotProcessPkt /opt/suricata/src/./tm-threads.h:163:9
#17 0xcc7335 in AFPParsePacketV3 /opt/suricata/src/source-af-packet.c:1130:9
#18 0xcc5887 in AFPWalkBlock /opt/suricata/src/source-af-packet.c:1146:15
#19 0xcb5636 in AFPReadFromRingV3 /opt/suricata/src/source-af-packet.c:1196:15
#20 0xcb1e2f in ReceiveAFPLoop /opt/suricata/src/source-af-packet.c:1589:17
#21 0xe04c30 in TmThreadsSlotPktAcqLoop /opt/suricata/src/tm-threads.c:355:13
#22 0x7ffae20e3fa2 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7fa2)
SUMMARY: AddressSanitizer: 2847 byte(s) leaked in 100 allocation(s).
suricata --build-info
This is Suricata version 6.0.0-dev (d41aeccea 2020-01-28)
Features: PCAP_SET_BUFF AF_PACKET HAVE_PACKET_FANOUT LIBCAP_NG LIBNET1.1 HAVE_HTP_URI_NORMALIZE_HOOK PCRE_JIT HAVE_NSS HAVE_LUA HAVE_LUAJIT HAVE_LIBJANSSON TLS MAGIC RUST
SIMD support: SSE_4_2 SSE_4_1 SSE_3
Atomic intrinsics: 1 2 4 8 16 byte(s)
64-bits, Little-endian architecture
GCC version 4.2.1 Compatible Clang 7.0.1 (tags/RELEASE_701/final), C version 199901
compiled with _FORTIFY_SOURCE=0
L1 cache line size (CLS)=64
thread local storage method: __thread
compiled with LibHTP v0.5.32, linked against LibHTP v0.5.32
Suricata Configuration:
AF_PACKET support: yes
eBPF support: yes
XDP support: yes
PF_RING support: no
NFQueue support: no
NFLOG support: no
IPFW support: no
Netmap support: no
DAG enabled: no
Napatech enabled: no
WinDivert enabled: no
Unix socket enabled: yes
Detection enabled: yes
Libmagic support: yes
libnss support: yes
libnspr support: yes
libjansson support: yes
hiredis support: no
hiredis async with libevent: no
Prelude support: no
PCRE jit: yes
LUA support: yes, through luajit
libluajit: yes
GeoIP2 support: yes
Non-bundled htp: no
Old barnyard2 support: no
Hyperscan support: yes
Libnet support: yes
liblz4 support: yes
Rust support: yes
Rust strict mode: yes
Rust compiler path: /root/.cargo/bin/rustc
Rust compiler version: rustc 1.40.0 (73528e339 2019-12-16)
Cargo path: /root/.cargo/bin/cargo
Cargo version: cargo 1.40.0 (bc8e4c8be 2019-11-22)
Cargo vendor: yes
Python support: yes
Python path: /usr/bin/python3
Python distutils yes
Python yaml no
Install suricatactl: yes
Install suricatasc: yes
Install suricata-update: not bundled
Profiling enabled: no
Profiling locks enabled: no
Development settings:
Coccinelle / spatch: no
Unit tests enabled: no
Debug output enabled: no
Debug validation enabled: no
Generic build parameters:
Installation prefix: /usr
Configuration directory: /etc/suricata/
Log directory: /var/log/suricata/
--prefix /usr
--sysconfdir /etc
--localstatedir /var
--datarootdir /usr/share
Host: x86_64-pc-linux-gnu
Compiler: clang (exec name) / clang (real)
GCC Protect enabled: no
GCC march native enabled: yes
GCC Profile enabled: no
Position Independent Executable enabled: no
CFLAGS -ggdb -O0 -Werror -Wchar-subscripts -Wshadow -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function -fno-strict-aliasing -fstack-protector-all -fsanitize=address -fno-omit-frame-pointer -Wno-unused-parameter -Wno-unused-function -march=native -I${srcdir}/../rust/gen
PCAP_CFLAGS -I/usr/include
SECCFLAGS
Actions