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 1451404 - nftables saved configuration shouldn't be world-readable
Summary: nftables saved configuration shouldn't be world-readable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nftables
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Phil Sutter
QA Contact: Tomas Dolezal
Ioanna Gkioka
URL:
Whiteboard:
Depends On:
Blocks: 1470965 1472751
TreeView+ depends on / blocked
 
Reported: 2017-05-16 15:02 UTC by Tomas Dolezal
Modified: 2018-04-10 16:09 UTC (History)
6 users (show)

Fixed In Version: nftables-0.8-3.el7
Doc Type: Release Note
Doc Text:
The `nftables` configuration files are no longer publicly readable Previously, during installation in the `RPM` file, the `nftables` configuration file mode bits were not adjusted accordingly. As a consequence, the configuration templates in the `/etc/nftables` directory and the `etc/sysconfig/nftables.conf` main configuration file were publicly readable. With this update, the file mode bits are explicitly set to correct values when installing the configuration files. As a result, the user can now install the configuration files with the correct permissions. Note that the configuration files which are not modified by the administrator, are replaced with configuration files with the correct permissions. The modified configuration files are not replaced. In that case, for `/etc/sysconfig/nftables.conf`, an rpmnew file is created which has the correct permissions. For any files in `/etc/nftables`, no rpmnew file is created, and the user must manually set the permissions.
Clone Of:
: 1685238 1931790 (view as bug list)
Environment:
Last Closed: 2018-04-10 16:09:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0882 0 None None None 2018-04-10 16:09:34 UTC

Internal Links: 1931790

Description Tomas Dolezal 2017-05-16 15:02:37 UTC
Description of problem:
like iptables, nftables configuration should not be readable by other than root user for security reasons. It should not have any functional implications.

Version-Release number of selected component (if applicable):
nftables-0.6-4.el7.x86_64

How reproducible:
always

Actual results:
stat -c '%A %U:%G %n' /etc/sysconfig/*tabl* /etc/nftables{,/*}
-rw------- root:root /etc/sysconfig/ebtables-config
-rw------- root:root /etc/sysconfig/ip6tables-config
-rw------- root:root /etc/sysconfig/iptables-config
-rw-r--r-- root:root /etc/sysconfig/nftables.conf
drwxr-xr-x root:root /etc/nftables
-rw-r--r-- root:root /etc/nftables/bridge-filter
-rw-r--r-- root:root /etc/nftables/inet-filter
-rw-r--r-- root:root /etc/nftables/ipv4-filter
-rw-r--r-- root:root /etc/nftables/ipv4-mangle
-rw-r--r-- root:root /etc/nftables/ipv4-nat
-rw-r--r-- root:root /etc/nftables/ipv6-filter
-rw-r--r-- root:root /etc/nftables/ipv6-mangle
-rw-r--r-- root:root /etc/nftables/ipv6-nat

Expected results:
ownership stays same, g,o mode is 0. the same applies for /etc/nftables/ folder

Additional info:

Comment 2 Tomas Dolezal 2017-08-08 09:40:54 UTC
granting qa_ack for 7.5; RPL

Comment 3 Phil Sutter 2017-08-16 16:27:56 UTC
Regarding to release notes, clarify what happens if users have modified configs: Are they changed automatically? Can we make RPM change them? Not sure if users become aware of permission changes for created *.rpmnew files.

Comment 5 Phil Sutter 2017-10-17 13:14:52 UTC
(In reply to Phil Sutter from comment #3)
> Regarding to release notes, clarify what happens if users have modified
> configs: Are they changed automatically? Can we make RPM change them? Not
> sure if users become aware of permission changes for created *.rpmnew files.

If unmodified, all config files are overwritten with updates from RPM and hence permissions are changed as well. If files were modified by the user, for /etc/sysconfig/nftables.conf an rpmnew file is created (with correct permissions), files in /etc/nftables are just left unmodified (and no rpmnew file is created). Not sure why the latter happens, but this should be documented at least.

Comment 14 errata-xmlrpc 2018-04-10 16:09:09 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://access.redhat.com/errata/RHEA-2018:0882


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