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.
DescriptionMasahiro Matsuya
2020-08-11 09:24:47 UTC
Description of problem:
The customer reported an RHEL8 installation failure caused by the oscap command to apply the PCI-DSS profile.
The actual root cause was the existence of a custom file which name contains an unexpected characters. The customer could resolve the installation failure by removing the file, but he is expecting that the installation doesn't fail with this kind of the python code exception. The installation could not complete with this problem.
Please backport this one: https://github.com/OpenSCAP/oscap-anaconda-addon/pull/124 to fix it.
This is the anaconda exception with UnicodeDecodeError, and the installation could not finish.
anaconda 29.19.2.17 exception report
Traceback (most recent call first):
File "/usr/share/anaconda/addons/org_fedora_oscap/common.py", line 140, in execute
self.stderr = stderr.decode()
File "/usr/share/anaconda/addons/org_fedora_oscap/common.py", line 269, in run_oscap_remediate
proc.execute(preexec_fn=do_chroot)
File "/usr/share/anaconda/addons/org_fedora_oscap/ks/oscap.py", line 549, in execute
chroot=getSysroot())
File "/usr/lib64/python3.6/site-packages/pyanaconda/addons.py", line 92, in execute
v.execute(storage, ksdata, instClass, users, payload)
File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 446, in run_task
self._task(*self._task_args, **self._task_kwargs)
File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 453, in run_task
raise e
File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 487, in start
self.run_task()
File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 311, in start
item.start()
File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 311, in start
item.start()
File "/usr/lib64/python3.6/site-packages/pyanaconda/installation.py", line 211, in doConfiguration
configuration_queue.start()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib64/python3.6/site-packages/pyanaconda/threading.py", line 286, in run
threading.Thread.run(self)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 558: invalid continuation byte
Version-Release number of selected component (if applicable):
RHEL8.2
How reproducible:
Always by locating a file which name is not UTF-8
Steps to Reproduce:
1. Start RHEL8.2 installation
2. Locate a file which name is not UTF-8 into /root
Or, use pre-existing filesystem including such a file for the installation.
3. Select PCI-DSS security policy
Actual results:
The installation failed with unexpected unknown error.
Expected results:
The installation can complete, and the oscap problem can be reviewed after installation.
This issue touches very peculiar waters of filename encoding. IIRC, there is no way for the scanner to know what filename encoding does a particular filesystem use, so fixing such issues reliably is very difficult.
This patch should improve the situation on the Anaconda side, and it looks like that there is no other problem (i.e. oscap doesn't crash), so there is a high likelihood that the issue is indeed fixed.
This usually happens on network drives that are shared across multiple OSs, and therefore more likely to contain problematic filename encoding. Could you please check out whether the file was on a network filesystem? If you know which rule caused this, that would be awesome, but that's more difficult to find out.
I am asking because it could be that there is a glitch in the content as well.
Reproduced on RHEL-8.3.0-20200811.0 x86_64
steps to reproduce by manual installation
setup:
- prepare machine with separate /data filesystem (minimal packageset is enough)
- put file with problematic name to /data/
$ touch /data/$(echo "00000000: 5468 6174 47c7 d673 2063 6f72 7265 6374 ThatG..s correct" | xxd -r)
test:
- start new installation
- choose custom patritioning
- instruct installer to reuse and NOT reformat /data partition
- choose PCI-DSS security policy
- start installation (minimal packageset is enough)
it stops with traceback
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 558: invalid continuation byte
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 (oscap-anaconda-addon 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-2020:4772