Bug 1282687

Summary: rsyslog segfaults when using rulesets with parsers
Product: Red Hat Enterprise Linux 7 Reporter: Sergei Turchanov <the_plumber>
Component: rsyslogAssignee: Radovan Sroka <rsroka>
Status: CLOSED ERRATA QA Contact: Stefan Dordevic <sdordevi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: pvrabec, rsroka, sdordevi
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:36:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1295396, 1296594, 1313485    
Attachments:
Description Flags
Fix for rhel7 none

Description Sergei Turchanov 2015-11-17 06:10:41 UTC
This bug was fixed a while in the mainline 
https://github.com/rsyslog/rsyslog/commit/84f984f5b52f4ab78800a60736af5a6f476defb6

How to reproduce:

/etc/rsyslog.d/50-test.conf:
-------------------------------------------------
module(load="pmcisconames")
ruleset(name="testrs" parser="rsyslog.cisconames") {
    action(type="omfile" file="/tmp/testfile")
}

module(load="imudp")
input(type="imudp" port="614" ruleset="testrs")
-------------------------------------------------

Upon startup rsyslog segfaults:

*** Error in `rsyslogd': double free or corruption (fasttop): 0x00007f748be61db0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7d1fd)[0x7f7488fbe1fd]
rsyslogd(rulesetProcessCnf+0x1d9)[0x7f748a5d6029]
rsyslogd(cnfDoObj+0x68)[0x7f748a5b92c8]
rsyslogd(yyparse+0xc33)[0x7f748a5a9413]
rsyslogd(load+0xc44)[0x7f748a5b8cd4]
rsyslogd(realMain+0x963)[0x7f748a59e323]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f7488f62af5]
rsyslogd(+0x106b9)[0x7f748a59c6b9]

Comment 2 Tomas Heinrich 2016-01-21 12:52:00 UTC
Reproduced, thanks.

Comment 4 Radovan Sroka 2016-02-12 18:08:00 UTC
This is minimal config to reproduce this bug.

----------------------------------------------
ruleset(name="testrs"
        parser="rsyslog.rfc3164") {
    action(type="omfile" file="/tmp/testfile")
}

call testrs
----------------------------------------------

Comment 5 Radovan Sroka 2016-02-12 18:10:48 UTC
Created attachment 1123604 [details]
Fix for rhel7

Double free fixed.

Comment 10 errata-xmlrpc 2016-11-04 05:36:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2401.html