Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
rsyslogd segfault when set statement is not valid.
# cat /etc/rsyslog.d/test.conf
set $testvar;
# rsyslogd -n -d
Segmentation fault
# rpm -q rsyslog
rsyslog-8.24.0-12.el7.x86_64
Same result also for statement
set $testvar=;
gdb says:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff3cd0700 (LWP 11806)]
0x00007ffff639f4b7 in readjournal () at imjournal.c:326
326 if (sys_iden == NULL && !cs.dfltTag[0]) {
This is a regression against the upstream version.
I have confirmed that the issue is caused by our downstream patch
rsyslog-8.24.0-rhbz1188503-imjournal-default-tag.patch
Created attachment 1304172[details]
proposed patch
Some guy was dereferencing pointer which was NULL in that specific case.
I fixed that condition but some addition tests are required because I am not sure if it doesn't change functionality in other use cases.
I think that previous version check only if default tag was empty string and doesn't check what this pointer was valid. Now the condition checks whether pointer is valid but not occurrence of the empty string.
I think that condition should cover both cases.
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://access.redhat.com/errata/RHBA-2018:0856
Description of problem: rsyslogd segfault when set statement is not valid. # cat /etc/rsyslog.d/test.conf set $testvar; # rsyslogd -n -d Segmentation fault # rpm -q rsyslog rsyslog-8.24.0-12.el7.x86_64 Same result also for statement set $testvar=; gdb says: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff3cd0700 (LWP 11806)] 0x00007ffff639f4b7 in readjournal () at imjournal.c:326 326 if (sys_iden == NULL && !cs.dfltTag[0]) { This is a regression against the upstream version. I have confirmed that the issue is caused by our downstream patch rsyslog-8.24.0-rhbz1188503-imjournal-default-tag.patch