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 2129466 - bind-chroot-9.16.23-1.el9.x86_64 fails to create mount point /var/named/chroot/usr/lib64/named in chroot
Summary: bind-chroot-9.16.23-1.el9.x86_64 fails to create mount point /var/named/chroo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: bind
Version: 9.0
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Petr Menšík
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: 2160473
TreeView+ depends on / blocked
 
Reported: 2022-09-23 21:52 UTC by gmcnealy@redhat.com
Modified: 2023-05-09 08:47 UTC (History)
1 user (show)

Fixed In Version: bind-9.16.23-6.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2160473 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:40:26 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/centos-stream/rpms bind merge_requests 10 0 None opened Fix CVE-2022-3080 2022-10-04 18:14:37 UTC
Red Hat Issue Tracker RHELPLAN-134814 0 None None None 2022-09-23 21:56:42 UTC
Red Hat Product Errata RHSA-2023:2261 0 None None None 2023-05-09 07:40:54 UTC

Description gmcnealy@redhat.com 2022-09-23 21:52:17 UTC
Description of problem:

Running systemctl status named-chroot-setup throws an error

# systemctl status named-chroot-setup.service
○ named-chroot-setup.service - Set-up/destroy chroot environment for named (DNS)
     Loaded: loaded (/usr/lib/systemd/system/named-chroot-setup.service; static)
     Active: inactive (dead) since Thu 2022-09-22 15:27:40 PDT; 13min ago
    Process: 933 ExecStart=/usr/libexec/setup-named-chroot.sh /var/named/chroot on /etc/named-chroot.files (code=exited, status=0/SUCCESS)
    Process: 1040 ExecStop=/usr/libexec/setup-named-chroot.sh /var/named/chroot off /etc/named-chroot.files (code=exited, status=0/SUCCESS)
   Main PID: 933 (code=exited, status=0/SUCCESS)
        CPU: 80ms

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

Fresh install of RHEL 9.0 

bind-license-9.16.23-1.el9.noarch
bind-libs-9.16.23-1.el9.x86_64
bind-utils-9.16.23-1.el9.x86_64
bind-dnssec-doc-9.16.23-1.el9.noarch
bind-dnssec-utils-9.16.23-1.el9.x86_64
bind-9.16.23-1.el9.x86_64
bind-chroot-9.16.23-1.el9.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Install RHEL 9
2. Install Bind packages listed above
3. Run systemctl status named-chroot-setup.service

Actual results:

# systemctl status named-chroot-setup.service
○ named-chroot-setup.service - Set-up/destroy chroot environment for named (DNS)
     Loaded: loaded (/usr/lib/systemd/system/named-chroot-setup.service; static)
     Active: inactive (dead) since Thu 2022-09-22 15:27:40 PDT; 13min ago
    Process: 933 ExecStart=/usr/libexec/setup-named-chroot.sh /var/named/chroot on /etc/named-chroot.files (code=exited, status=0/SUCCESS)
    Process: 1040 ExecStop=/usr/libexec/setup-named-chroot.sh /var/named/chroot off /etc/named-chroot.files (code=exited, status=0/SUCCESS)
   Main PID: 933 (code=exited, status=0/SUCCESS)
        CPU: 80ms

Sep 22 15:27:38 systemd[1]: Starting Set-up/destroy chroot environment for named (DNS)...
Sep 22 15:27:38 setup-named-chroot.sh[979]: ls: cannot access '/var/named/chroot/usr/lib64/named': No such file or directory
Sep 22 15:27:38 setup-named-chroot.sh[981]: mount: /var/named/chroot/usr/lib64/named: mount point does not exist.
Sep 22 15:27:38 systemd[1]: Finished Set-up/destroy chroot environment for named (DNS).
Sep 22 15:27:39 systemd[1]: Stopping Set-up/destroy chroot environment for named (DNS)...
Sep 22 15:27:40 systemd[1]: named-chroot-setup.service: Deactivated successfully.
Sep 22 15:27:40 systemd[1]: Stopped Set-up/destroy chroot environment for named (DNS).

Expected results:

Expected bind-chroot-9.16.23-1.el9.x86_64 to find and mount /var/named/chroot/usr/lib64/named in chroot

Additional info:

The dir is in the list to mount, and it exists in the main root, but the mount point does not exist in the chroot (installed by named-chroot package):

[root@staypuft:~]# egrep "lib64/named" /etc/named-chroot.files
/usr/lib64/named

# ls -ald /usr/lib64/named
drwxr-xr-x. 2 root root 28 Sep 20 13:52 /usr/lib64/named

# ls -al /var/named/chroot/usr/lib64/
total 0
drwxr-xr-x. 3 root root 18 Sep 22 15:45 .
drwxr-xr-x. 4 root root 32 Sep 20 13:52 ..
drwxr-xr-x. 2 root root  6 Nov 26  2021 bind

Since named-chroot creates the dirs in /var/named/chroot, and /var/named/chroot/usr/lib64/named does not exist and therefore cannot be chroot mounted, I believe this is an error in the package (in not creating that mount point).

Comment 2 Petr Menšík 2022-10-03 12:33:55 UTC
Ah yes, there are two directories for /usr/lib64/bind and /usr/lib64/named. But in package files only %dir %{chroot_prefix}/%{_libdir}/bind is mentioned, but %dir %{chroot_prefix}/%{_libdir}/named is not. But because /etc/named-chroot.files lists /usr/lib64/named and that source directory exists, it checks whether target directory is empty. It is missing in this case and it should not.

Just adding %{chroot_prefix}/%{_libdir}/named between the chroot files should help.

Comment 8 errata-xmlrpc 2023-05-09 07:40:26 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 (Moderate: bind security and bug fix 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/RHSA-2023:2261


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