Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Certain directory structures inside the directory from which the iso is created can result in mkisofs creating hardlinked directories.
hardlinked directories should never be created.
Version-Release number of selected component (if applicable):
all versions
How reproducible:
easy; see steps below
Steps to Reproduce:
# cd /var/tmp
# mkdir -p iso_root/dir{1,2,3}
# mkdir -p iso_root/dir3/subdir
# touch iso_root/dir1/testfile{1,2,3}
# mount -obind iso_root/dir1 iso_root/dir2
# mount -obind iso_root/dir3 iso_root/dir3/subdir
# mkisofs -o out.iso -fRJ iso_root
# mount -oloop out.iso /mnt/tmp >/dev/null 2>&1
# ls -lid /mnt/tmp/dir1 /mnt/tmp/dir2 /mnt/tmp/dir3 /mnt/tmp/dir3/subdir
Actual results:
# ls -lid /mnt/tmp/dir1 /mnt/tmp/dir2 /mnt/tmp/dir3 /mnt/tmp/dir3/subdir
1856 drwxr-xr-x. 2 root root 2048 Sep 5 13:43 /mnt/tmp/dir1
1856 drwxr-xr-x. 2 root root 2048 Sep 5 13:43 /mnt/tmp/dir2
1984 drwxr-xr-x. 3 root root 2048 Sep 5 10:27 /mnt/tmp/dir3
1984 drwxr-xr-x. 3 root root 2048 Sep 5 10:27 /mnt/tmp/dir3/subdir
this results in two instances of hardinked directories:
both dir1 and dir2 have the same inode
both dir3 and dir3/subdir have the same inode, so this is a true directory loop
when mounted in linux, depending on the kernel running on the system on which the iso is mounted, the kernel may return EIO when a second (or 3rd+) is encountered, or may silently handle the duplicated inode.
Expected results:
hardlinked directories should never be created
mkisofs should refuse to create hardlinked directories with a fatal error.
Alternately, mkisofs could transform subsequent instances of a directory into a symlink to the first, or perhaps create a second directory, but still hardlink the file contents
Additional info:
an alternate way to create the root (without bind mounts) is the following:
# mkdir -p iso_root/release-{1.0,1.1,1.2,latest}
# mount server:/exports/rpms/rpms-1.0 iso_root/release-1.0
# mount server:/exports/rpms/rpms-1.1 iso_root/release-1.1
# mount server:/exports/rpms/rpms-1.2 iso_root/release-1.2
# mount server:/exports/rpms/rpms-1.2 iso_root/release-latest
release-1.2 and release-latest will both have the same inode
note that bz1749390 has also been raised to address some in-kernel handling of the duplicate directory inodes in some rhel 7 kernels
Description of problem: Certain directory structures inside the directory from which the iso is created can result in mkisofs creating hardlinked directories. hardlinked directories should never be created. Version-Release number of selected component (if applicable): all versions How reproducible: easy; see steps below Steps to Reproduce: # cd /var/tmp # mkdir -p iso_root/dir{1,2,3} # mkdir -p iso_root/dir3/subdir # touch iso_root/dir1/testfile{1,2,3} # mount -obind iso_root/dir1 iso_root/dir2 # mount -obind iso_root/dir3 iso_root/dir3/subdir # mkisofs -o out.iso -fRJ iso_root # mount -oloop out.iso /mnt/tmp >/dev/null 2>&1 # ls -lid /mnt/tmp/dir1 /mnt/tmp/dir2 /mnt/tmp/dir3 /mnt/tmp/dir3/subdir Actual results: # ls -lid /mnt/tmp/dir1 /mnt/tmp/dir2 /mnt/tmp/dir3 /mnt/tmp/dir3/subdir 1856 drwxr-xr-x. 2 root root 2048 Sep 5 13:43 /mnt/tmp/dir1 1856 drwxr-xr-x. 2 root root 2048 Sep 5 13:43 /mnt/tmp/dir2 1984 drwxr-xr-x. 3 root root 2048 Sep 5 10:27 /mnt/tmp/dir3 1984 drwxr-xr-x. 3 root root 2048 Sep 5 10:27 /mnt/tmp/dir3/subdir this results in two instances of hardinked directories: both dir1 and dir2 have the same inode both dir3 and dir3/subdir have the same inode, so this is a true directory loop when mounted in linux, depending on the kernel running on the system on which the iso is mounted, the kernel may return EIO when a second (or 3rd+) is encountered, or may silently handle the duplicated inode. Expected results: hardlinked directories should never be created mkisofs should refuse to create hardlinked directories with a fatal error. Alternately, mkisofs could transform subsequent instances of a directory into a symlink to the first, or perhaps create a second directory, but still hardlink the file contents Additional info: an alternate way to create the root (without bind mounts) is the following: # mkdir -p iso_root/release-{1.0,1.1,1.2,latest} # mount server:/exports/rpms/rpms-1.0 iso_root/release-1.0 # mount server:/exports/rpms/rpms-1.1 iso_root/release-1.1 # mount server:/exports/rpms/rpms-1.2 iso_root/release-1.2 # mount server:/exports/rpms/rpms-1.2 iso_root/release-latest release-1.2 and release-latest will both have the same inode note that bz1749390 has also been raised to address some in-kernel handling of the duplicate directory inodes in some rhel 7 kernels