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 1819684 - dnsmasq does not honour sysusers.d override during installation
Summary: dnsmasq does not honour sysusers.d override during installation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnsmasq
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: 8.0
Assignee: Tomas Korbar
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: 1771008 1894575 2099232
TreeView+ depends on / blocked
 
Reported: 2020-04-01 10:05 UTC by Didier
Modified: 2022-06-20 11:30 UTC (History)
3 users (show)

Fixed In Version: dnsmasq-2.79-14.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2099232 (view as bug list)
Environment:
Last Closed: 2021-05-18 15:38:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Didier 2020-04-01 10:05:06 UTC
Description of problem:

dnsmasq installation relies on systemd-sysusers to create the dnsmasq user & group.
The dnsmasq installation does not honour the /etc/sysusers.d/dnsmasq.conf override, which is documented in "man sysusers.d". 


Version-Release number of selected component (if applicable):

dnsmasq-2.79-6.el8.x86_64
systemd-239-18.el8_1.1.x86_64


How reproducible:

always


Steps to Reproduce:

1. create /etc/sysusers.d/dnsmasq.conf
2. dnf install dnsmasq


Actual results:

dnsmasq ignores the configuration as defined in /etc/sysusers.d/dnsmasq.conf 


Expected results:

dnsmasq should honor the configuration in /etc/sysusers.d/dnsmasq.conf 


Additional info:

We are running EL for the past 20 years, and have user account UID/GID's starting from 500 and upwards (as was the default in EL<7).

Starting from EL7, lowest UID/GID for system packages has been rebased from 500 to 1000 ; relocating our 500-999 UID/GID use account range is not an option.

In EL7, to retain compatibility across our server & storage infra, we mitigated this by modifying the /etc/login.defs values.

In EL8, packages are starting to apply systemd-based systemd-sysusers.
Systemd does *NOT* respect /etc/login.defs, but relies on a hardcoded (repeat : hardcoded) UID/GID value (1000) as high bounderay for system packages.

systemd-sysusers allows to define the UID/GID range via the sysusers.d mechanism ('man man sysusers.d'), providing an opportunity to prevent UID/GID collisions below the 1000 range.

dnsmasq does not honour this mechanism, resulting in UID/GID collisions between system packages and existing user accounts, which presents a security risk, as users now can manipulate system packages.
-> severity=[high]


Possibly related to : bz#1792462

Comment 21 errata-xmlrpc 2021-05-18 15:38:16 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 (dnsmasq bug fix and enhancement update), 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-2021:1800


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