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.

Bug 1876832

Summary: dnf segfaults when a *.repo filename contains non-UTF character
Product: Red Hat Enterprise Linux 8 Reporter: Pavel Moravec <pmoravec>
Component: libdnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: swm-qe
Severity: high Docs Contact:
Priority: medium    
Version: 8.2Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-08 19:48:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Moravec 2020-09-08 10:05:42 UTC
Description of problem:
Inspired by bz1870874, when a filename in /etc/yum.repos.d contains non-UTF character, dnf segfaults.


Version-Release number of selected component (if applicable):
RHEL8.2, in particular:
python3-dnf-4.2.17-7.el8_2.noarch
dnf-4.2.17-7.el8_2.noarch
python3-libdnf-0.39.1-6.el8_2.x86_64
python3-dnf-plugins-core-4.0.12-3.el8.noarch
dnf-plugin-subscription-manager-1.26.17-1.el8_2.x86_64
libdnf-0.39.1-6.el8_2.x86_64
dnf-plugins-core-4.0.12-3.el8.noarch
dnf-data-4.2.17-7.el8_2.noarch
python36-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64


How reproducible:
100%


Steps to Reproduce:
1. touch '/etc/yum.repos.d/team'$'\303''_epel.repo' 
2. dnf history  # or any other dnf command


Actual results:
2. dnf segfaults, with backtrace:

        f = Frame 0x7fffd709e908, for file /usr/lib64/python3.6/site-packages/libdnf/conf.py, line 1881,
        f = Frame 0x555555ba6cf8, for file /usr/lib64/python3.6/site-packages/libdnf/conf.py, line 1989,
        f = Frame 0x555555f42458, for file /usr/lib/python3.6/site-packages/dnf/conf/read.py, line 102,
        f = Frame 0x555555f23988, for file /usr/lib/python3.6/site-packages/dnf/conf/read.py, line 48,
        f = Frame 0x5555560776e8, for file /usr/lib/python3.6/site-packages/dnf/base.py, line 474,
        f = Frame 0x555555cccbf8, for file /usr/lib/python3.6/site-packages/dnf/cli/cli.py, line 748,
        f = Frame 0x555555a48c38, for file /usr/lib/python3.6/site-packages/dnf/cli/cli.py, line 967,
        f = Frame 0x555555bf7c68, for file /usr/lib/python3.6/site-packages/dnf/cli/main.py, line 94,
        f = Frame 0x555555b8e818, for file /usr/lib/python3.6/site-packages/dnf/cli/main.py, line 65,
        f = Frame 0x555555a05618, for file /usr/lib/python3.6/site-packages/dnf/cli/main.py, line 191,

I.e. somewhere in:

class ConfigParser(_object):
    def read(self, filePath):
        return _conf.ConfigParser_read(self, filePath)


Expected results:
2. no segfault


Additional info:

Comment 1 Pavel Moravec 2020-09-08 19:48:25 UTC
I am blind.. there is a BZ and even fixed.

*** This bug has been marked as a duplicate of bug 1803038 ***