Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-59893

rsyslogd crashes on startup when an invalid rainer script is specified

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-8.10, rhel-9.4
    • rsyslog
    • None
    • No
    • Low
    • rhel-sst-security-special-projects
    • ssg_security
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • All
    • None

      What were you trying to do that didn't work?

      When an invalid rainer script is specified, rsyslogd crashes instead of just reporting the syntax error:

      # cat /etc/rsyslog.d/crash.conf 
      if ($fromhost-ip == '192.168.0.1') or if ($fromhost-ip == '192.168.0.2') then {
      	stop
      }
      
      # rsyslogd -d -n
      [...]
      4617.291098543:main thread    : operatingstate.c: osf: MSG error during parsing file /etc/rsyslog.d/crash.conf, on or before line 1: Invalid function if: prop/AddRef is passed a NULL ptr - ignoring it - further problems may occur
      rsyslogd: error during parsing file /etc/rsyslog.d/crash.conf, on or before line 1: Invalid function if [v8.2310.0-4.el9 try https://www.rsyslog.com/e/2207 ]
      Segmentation fault (core dumped)
      

      Here above I used a if xxx or if yyy which is not a valid syntax.

      What is the impact of this issue to you?

      Low impact

      Please provide the package NVR for which the bug is seen:

      rsyslog-8.2310.0-4.el9.x86_64
      rsyslog-8.2102.0-15.el8.x86_64

      How reproducible is this bug?:

      Always, see above

              rh-ee-alakatos Attila Lakatos
              rhn-support-rmetrich Renaud Métrich
              Attila Lakatos Attila Lakatos
              SSG Security QE SSG Security QE
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: