Fix crash in msc_rules_add_file() when using disruptive action in child rule inside of chain

This commit is contained in:
Victor Hora 2018-10-17 14:22:44 -04:00 committed by Felipe Zimmerle
parent 466a427ab4
commit 8088d6af71
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
v3.0.3 - YYYY-MMM-DD (to be released) v3.0.3 - YYYY-MMM-DD (to be released)
------------------------------------- -------------------------------------
- Fix crash in msc_rules_add_file() when using disruptive action in chain
[Issue #1849 - @victorhora, @zimmerle, @rperper]
- Fix memory leak in AuditLog::init() - Fix memory leak in AuditLog::init()
[Issue #1897 - @weliu] [Issue #1897 - @weliu]
- Fix RulesProperties::appendRules() - Fix RulesProperties::appendRules()

View File

@ -80,13 +80,13 @@ int Driver::addSecRule(Rule *rule) {
if (lastRule && lastRule->m_chained) { if (lastRule && lastRule->m_chained) {
if (lastRule->m_chainedRuleChild == NULL) { if (lastRule->m_chainedRuleChild == NULL) {
rule->m_phase = lastRule->m_phase; rule->m_phase = lastRule->m_phase;
lastRule->m_chainedRuleChild = rule;
rule->m_chainedRuleParent = lastRule;
if (rule->m_theDisruptiveAction) { if (rule->m_theDisruptiveAction) {
m_parserError << "Disruptive actions can only be specified by"; m_parserError << "Disruptive actions can only be specified by";
m_parserError << " chain starter rules."; m_parserError << " chain starter rules.";
return false; return false;
} }
lastRule->m_chainedRuleChild = rule;
rule->m_chainedRuleParent = lastRule;
return true; return true;
} else { } else {
Rule *a = lastRule->m_chainedRuleChild; Rule *a = lastRule->m_chainedRuleChild;