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

Null dereference while parsing a tcp packet #23

Closed
bshastry opened this Issue May 3, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@bshastry

bshastry commented May 3, 2017

Hi,

I'd like to report a null deference in cd_tcp.cc while parsing a tcp packet. Here's the active crash trace:

0x00000000004e2aa4 in (anonymous namespace)::TcpCodec::decode (this=0xcfe1b0, raw=..., codec=..., snort=...) at cd_tcp.cc:193
193                 COPY4(ph6.sip, ip6h->get_src()->u6_addr32);
(gdb) bt
#0  0x00000000004e2aa4 in (anonymous namespace)::TcpCodec::decode (this=0xcfe1b0, raw=..., codec=..., snort=...) at cd_tcp.cc:193
#1  0x000000000075b5c5 in PacketManager::decode (p=0x7fffec011f00, pkthdr=0x7ffff1e62a80, pkt=0x7fffec0020e0 "", cooked=false) at packet_manager.cc:153
#2  0x00000000004cfc81 in Snort::process_packet (p=0x7fffec011f00, pkthdr=0x7ffff1e62a80, pkt=0x7fffec0020e0 "", is_frag=false) at snort.cc:772
#3  0x00000000004d0091 in Snort::packet_callback (pkthdr=0x7ffff1e62a80, pkt=0x7fffec0020e0 "") at snort.cc:883
#4  0x000000000077ea2d in pcap_process_loop (user=0x7fffec000a20 "", pkth=<optimized out>, data=<optimized out>) at daq_pcap.c:370
#5  0x00007ffff6c40ac4 in ?? () from /usr/lib/x86_64-linux-gnu/libpcap.so.0.8
#6  0x000000000077e49d in pcap_daq_acquire (handle=0x7fffec000a20, cnt=0, callback=<optimized out>, metaback=<optimized out>, user=<optimized out>) at daq_pcap.c:388
#7  0x000000000073e3b9 in SFDAQInstance::acquire (this=0x7fffec000980, max=0, callback=0x4cff56 <Snort::packet_callback(void*, _daq_pkthdr const*, unsigned char const*)>) at sfdaq.cc:487
#8  0x00000000004bffa4 in Analyzer::analyze (this=0xcff030) at analyzer.cc:160
#9  0x00000000004bfd21 in Analyzer::operator() (this=0xcff030, ps=0xcff1d0) at analyzer.cc:98
#10 0x000000000048c323 in std::__invoke<Analyzer, Swapper*>(Analyzer&, Swapper*&&) (__f=...) at /usr/include/c++/5/functional:201
#11 0x000000000048c292 in std::reference_wrapper<Analyzer>::operator()<Swapper*>(Swapper*&&) const (this=0xcff240) at /usr/include/c++/5/functional:428
#12 0x000000000048c231 in std::_Bind_simple<std::reference_wrapper<Analyzer> (Swapper*)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0xcff238) at /usr/include/c++/5/functional:1531
#13 0x000000000048c04a in std::_Bind_simple<std::reference_wrapper<Analyzer> (Swapper*)>::operator()() (this=0xcff238) at /usr/include/c++/5/functional:1520
#14 0x000000000048bf81 in std::thread::_Impl<std::_Bind_simple<std::reference_wrapper<Analyzer> (Swapper*)> >::_M_run() (this=0xcff220) at /usr/include/c++/5/thread:115
#15 0x00007ffff62f6c80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#16 0x00007ffff5b096ba in start_thread (arg=0x7ffff1f37700) at pthread_create.c:333
#17 0x00007ffff583f82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Input triggering the null deref will be sent to bugs@snort.org. Fix is similar to issue #22.

@snortadmin

This comment has been minimized.

Show comment
Hide comment
@snortadmin

snortadmin May 3, 2017

Collaborator

Thanks. This is the same as issue #22. I will close this when that is closed.

Collaborator

snortadmin commented May 3, 2017

Thanks. This is the same as issue #22. I will close this when that is closed.

@snortadmin

This comment has been minimized.

Show comment
Hide comment
@snortadmin

snortadmin May 4, 2017

Collaborator

Fixed, see #22.

Collaborator

snortadmin commented May 4, 2017

Fixed, see #22.

@snortadmin snortadmin closed this May 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment