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.
Bug 1099065 - missing -Es in command string in lockdown-whitelist.xml
Summary: missing -Es in command string in lockdown-whitelist.xml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld
Version: 7.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Thomas Woerner
QA Contact: Tomas Dolezal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-19 12:12 UTC by Tomas Dolezal
Modified: 2015-03-05 13:23 UTC (History)
2 users (show)

Fixed In Version: firewalld-0.3.9-8.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:23:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0520 0 normal SHIPPED_LIVE firewalld bug fix and enhancement update 2015-03-05 16:33:07 UTC

Description Tomas Dolezal 2014-05-19 12:12:01 UTC
Description of problem:
lockdown-whitelist.xml contains commandline of python call without -Es arguments which were added during late development.

after updating the line '<command name="/usr/bin/python /usr/bin/firewall-config"/>' to contain -Es, nothing changes because userid of root is also allowed.

Please inspect why removing '<user id="0"/>' and adding '<command name="/usr/bin/python -Es /usr/bin/firewall-config"/>' does not work when I try to run #firewall-config and modify runtime configuration. lockdown rejection appears.


Version-Release number of selected component (if applicable):
firewalld-0.3.9-7.el7.noarch

How reproducible:
always

Steps to Reproduce:
<?xml version="1.0" encoding="utf-8"?>
<whitelist>
  <command name="/usr/bin/python /usr/bin/firewall-config"/>
  <command name="/usr/bin/python -Es /usr/bin/firewall-config"/>
  <selinux context="system_u:system_r:NetworkManager_t:s0"/>
  <selinux context="system_u:system_r:virtd_t:s0-s0:c0.c1023"/>
</whitelist>


#firewall-config
add runtime services -> ACCESS_DENIED

Expected results:
command lockdown works and is updated or removed

Additional info:

Comment 1 Jiri Popelka 2014-05-19 15:39:30 UTC
(In reply to Tomas Dolezal from comment #0)
> Description of problem:
> lockdown-whitelist.xml contains commandline of python call without -Es
> arguments which were added during late development.

yes,
https://git.fedorahosted.org/cgit/firewalld.git/commit/?id=119d8d35b925caa3b0be9f298be2cf91623aab22

> after updating the line '<command name="/usr/bin/python
> /usr/bin/firewall-config"/>' to contain -Es, nothing changes because userid
> of root is also allowed.

You're not supposed to be running firewall-config as root.

> Please inspect why removing '<user id="0"/>' and adding '<command
> name="/usr/bin/python -Es /usr/bin/firewall-config"/>' does not work when I
> try to run #firewall-config and modify runtime configuration. lockdown
> rejection appears.

When I try to run firewall-config twice, once as root and once as ordinary user (jpopelka) then 'ps -aux | grep firewall-config' shows:

USER     ... COMMAND
root     ... /usr/bin/python -Es /bin/firewall-config
jpopelka ... /usr/bin/python -Es /usr/bin/firewall-config

You can see that for root there's /usr missing.
If you add also the '/usr/bin/python -Es /bin/firewall-config' command into lockdown-whitelist.xml it works.

I agree that we need to add the -Es into the lockdown-whitelist.xml, but it's low priority. That line was added with
https://git.fedorahosted.org/cgit/firewalld.git/commit/?id=354e2dbe75bf657a0d2ebad6c7b5e510f0d141fc
so when a user turns lockdown on in firewall-config she's also able to turn it off with firewall-config.

Comment 2 Jiri Popelka 2014-05-19 15:40:55 UTC
Summary (for others):
Problem here is that when ordinary user turns lockdown on in firewall-config she's not able to turn it off again with firewall-config.
One needs to turn the lockdown off as root.

This problem concerns only firewall-config and doesn't influence lockdown feature as a whole - that works as expected.

Comment 7 errata-xmlrpc 2015-03-05 13:23:12 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/RHBA-2015-0520.html


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