Project

General

Profile

Actions

Bug #3164

closed

Suricata 4.1.4: NSS Shutdown triggers crashes in test mode

Added by Yujie Zhao over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

I'm trying to upgrade from Suricata 4.1.3 to 4.1.4. Both are built on the same Linux server. When I run Suricata 4.1.4, it always crashes at exit when NSS_Shutdown() is called. Seems NSS is not initialized successfully for 4.1.4.

Suricata 4.1.3 doesn't have this problem.


Related issues 1 (0 open1 closed)

Copied to Suricata - Bug #3189: NSS Shutdown triggers crashes in test mode (5.x)ClosedYujie ZhaoActions
Actions #1

Updated by Yujie Zhao over 5 years ago

I'm running Suricata 4.1.4, and that's related to the problem.

It seems Suricata 4.1.4 won't initialize NSS in the testing mode, but 4.1.4 will.

Actions #2

Updated by Yujie Zhao over 5 years ago

Here is the root cause:

In 4.1.3, Suricata exits directly in the test mode:

if (suricata.run_mode  RUNMODE_CONF_TEST){
SCLogNotice("Configuration provided was successfully loaded. Exiting.");
#ifdef HAVE_MAGIC
MagicDeinit();
#endif
exit(EXIT_SUCCESS);
}

In 4.1.4, the code is changed to support the engine analysis mode. Suricata doesn't exit directly, and instead it tries to clean up and that calls NSS_Shutdown() and triggers the crash.

if (suricata.run_mode  RUNMODE_ENGINE_ANALYSIS) {
goto out;
} else if (suricata.run_mode == RUNMODE_CONF_TEST){
SCLogNotice("Configuration provided was successfully loaded. Exiting.");
goto out;
}
Actions #3

Updated by Yujie Zhao over 5 years ago

Yujie Zhao wrote:

I'm running Suricata 4.1.4, and that's related to the problem.

It seems Suricata 4.1.4 won't initialize NSS in the testing mode, but 4.1.3 will.

Actions #4

Updated by Jason Ish over 5 years ago

  • Assignee set to Yujie Zhao
Actions #5

Updated by Yujie Zhao over 5 years ago

  • Subject changed from Suricata 4.1.4: NSS not initialized to Suricata 4.1.4: NSS Shutdown triggers crashes in test mode
Actions #6

Updated by Andreas Herz over 5 years ago

  • Target version set to TBD
Actions #7

Updated by Victor Julien over 5 years ago

  • Status changed from New to Closed
  • Target version changed from TBD to 4.1.5
Actions #8

Updated by Victor Julien over 5 years ago

  • Copied to Bug #3189: NSS Shutdown triggers crashes in test mode (5.x) added
Actions

Also available in: Atom PDF