Bug 1650995 - firewalld adds extra single quotes to log message configured in rich rules
Summary: firewalld adds extra single quotes to log message configured in rich rules
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: firewalld
Version: 30
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Eric Garver
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-18 15:41 UTC by Rick Dicaire
Modified: 2019-10-31 20:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1727155 (view as bug list)
Environment:
Last Closed:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github firewalld firewalld issues 480 None None None 2019-07-05 16:39:38 UTC

Description Rick Dicaire 2018-11-18 15:41:07 UTC
Description of problem:

firewalld adds extra single quotes to log message configured in rich rules:

Chain IN_public_log (1 references)
target     prot opt source               destination         
LOG        tcp  --  anywhere             anywhere             tcp dpts:rfb:5903 ! match-set home src ctstate NEW,UNTRACKED LOG level warning prefix "'TL0G_VNC: '"
LOG        tcp  --  anywhere             anywhere             tcp dpt:ssh ! match-set home src ctstate NEW,UNTRACKED LOG level warning prefix "'TL0G_SSH: '"

From /etc/firewalld/zones/public.xml:
  <rule family="ipv4">
    <source ipset="home" invert="True"/>
    <service name="vnc-server"/>
    <log prefix="TL0G_VNC: " level="warning"/>
    <reject type="host-unreach"/>
  </rule>
  <rule family="ipv4">
    <source ipset="home" invert="True"/>
    <service name="ssh"/>
    <log prefix="TL0G_SSH: " level="warning"/>
    <reject type="host-unreach"/>
  </rule>

Single quotes inside double quotes didn't exist prior to upgrade from Fedora 28. I cannot confirm if single quotes were there with initial version of firewalld shipped with Fedora 29 as my rich rules broke firewalld, and wasn't resolved until 0.6.3 was released.


Version-Release number of selected component (if applicable):
Name         : firewalld
Version      : 0.6.3
Release      : 1.fc29
Arch         : noarch
Size         : 1.8 M
Source       : firewalld-0.6.3-1.fc29.src.rpm
Repo         : @System
From repo    : updates
Summary      : A firewall daemon with D-Bus interface providing a dynamic firewall
URL          : http://www.firewalld.org
License      : GPLv2+
Description  : firewalld is a firewall service daemon that provides a dynamic customizable
             : firewall with a D-Bus interface.


How reproducible:
Create rich rule, configure a log message prefix.

Steps to Reproduce:
1.
2. 
3.

Actual results:

From iptables -L:
LOG        tcp  --  anywhere             anywhere             tcp dpts:rfb:5903 ! match-set home src ctstate NEW,UNTRACKED LOG level warning prefix "'TL0G_VNC: '"

From syslog:
Nov 18 10:25:59 daw kernel: 'TL0G_SSH: 'IN=ens3 OUT= MAC=52:54:3c:0e:7c:89:00:12:f2:91:b8:00:08:00 SRC=205.185.121.253 DST=162.35.145.51 LEN=44 TOS=0x00 PREC=0x00 TTL=247 ID=54321 PROTO=TCP SPT=39303 DPT=22 WINDOW=65535 RES=0x00 SYN URGP=0


Expected results:
From iptables -L
LOG        tcp  --  anywhere             anywhere             tcp dpts:rfb:5903 ! match-set home src ctstate NEW,UNTRACKED LOG level warning prefix "TL0G_VNC: "

From syslog:
Nov 18 10:25:59 daw kernel: TL0G_SSH: IN=ens3 OUT= MAC=52:54:3c:0e:7c:89:00:12:f2:91:b8:00:08:00 SRC=205.185.121.253 DST=162.35.145.51 LEN=44 TOS=0x00 PREC=0x00 TTL=247 ID=54321 PROTO=TCP SPT=39303 DPT=22 WINDOW=65535 RES=0x00 SYN URGP=0

Additional info:

Comment 1 Zdenek Dohnal 2019-03-12 13:45:39 UTC
If the report was created on demand in https://bugzilla.redhat.com/show_bug.cgi?id=1644432#c24 , then I encountered the same error - firewalld was running, but several errors were reported at the start - it was connected to my created rich rules for machines in virtual network and one of them was for mdns communication, so the issue had an outcome as blocking all mdns communication for me.

Comment 2 Zdenek Dohnal 2019-03-12 14:12:28 UTC
It is not, as Rick said in https://bugzilla.redhat.com/show_bug.cgi?id=1644432#c26 , sorry for the noise.

Comment 3 Rick Dicaire 2019-07-04 17:24:06 UTC
Hi, is this being ignored, or was it fixed in Fedora 30?

Comment 4 Eric Garver 2019-07-05 16:39:39 UTC
(In reply to Rick Dicaire from comment #3)
> Hi, is this being ignored, or was it fixed in Fedora 30?

It is not being ignore. It's just not yet fixed upstream.

  https://github.com/firewalld/firewalld/issues/480

Comment 5 Ben Cotton 2019-10-31 19:04:26 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Rick Dicaire 2019-10-31 20:12:17 UTC
Thanks for the update.


Note You need to log in before you can comment on or make changes to this bug.