Closed amishmm closed 1 year ago
Snort::setup() tries to reset the Memory module stats prior to it being setup, which is bad times.
main() -> Snort::setup() -> Snort::init() -> ModuleManager::reset_stats() -> Module::reset_stats() -> MemoryModule::get_counts() -> MemoryCap::get_mem_stats()
happens prior to main() -> Snort::setup() -> MemoryCap::setup()
and tries to access the 0th element of an empty pkt_mem_stats
vector, exploding in the sanity-check assertion above (when compiled without the assertion, it looks like it optimistically relies on undefined behavior of out-of-bounds vector accesses to return address 0 and accidentally work).
Thanks @Xiche
But from your reply I am not sure if it is a snort bug or I need to change something in the config?
It's a Snort bug. It will require code changes to refactor or otherwise fix up that initialization code path so it doesn't attempt to do what it is doing.
Thanks folks. We'll get this fixed ASAP.
The fix is in release 3.1.52.0. Thanks for reporting the issue.
Just compiled snort 3.1.51.0 (Snort 3.1.50.0 was working fine)
It builds well but when starting snort it gets killed with SIGABRT.
I am using Arch Linux. The contents of /etc/snort/local.lua are here: https://aur.archlinux.org/cgit/aur.git/plain/local.lua?h=snort-nfqueue
Build command is: (Full Source: https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=snort-nfqueue)
System journal log has this: