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 1704868 - CVE-2016-10228 glibc: iconv: Fix converter hangs and front end option parsing for //TRANSLIT and //IGNORE [rhel-8]
Summary: CVE-2016-10228 glibc: iconv: Fix converter hangs and front end option parsing...
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2018-07-24
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glibc
Version: 8.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.2
Assignee: Arjun Shankar
QA Contact: Sergey Kolosov
URL:
Whiteboard:
Depends On: 1893197
Blocks: CVE-2016-10228 1877115
TreeView+ depends on / blocked
 
Reported: 2019-04-30 17:19 UTC by Arjun Shankar
Modified: 2023-07-18 14:30 UTC (History)
9 users (show)

Fixed In Version: glibc-2.28-139.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 14:36:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1427734 1 None None None 2021-01-20 06:05:38 UTC
Sourceware 19519 0 P2 RESOLVED iconv(1) with -c option hangs on illegal multi-byte sequences (CVE-2016-10228) 2021-01-19 06:47:22 UTC
Sourceware 26383 0 P2 RESOLVED bind_textdomain_codeset doesn't accept //TRANSLIT anymore 2021-01-19 06:46:42 UTC

Internal Links: 1427734

Description Arjun Shankar 2019-04-30 17:19:06 UTC
In bug 1427734, we fixed the specific customer reported issue with some IBM converters and input sequences. However, the converters and the option processing in the front end still need an overhaul and rework upstream. This work will be tracked upstream in SWBZ#19519 and there is some context in other Sourceware bugs linked to bug 1427734.

Comment 4 Carlos O'Donell 2020-07-13 13:25:30 UTC
Fixed upstream with the following commit:

commit 91927b7c76437db860cd86a7714476b56bb39d07
Author: Arjun Shankar <arjun>
Date:   Tue Jul 7 20:31:48 2020 +0200

    Rewrite iconv option parsing [BZ #19519]
    
    This commit replaces string manipulation during `iconv_open' and iconv_prog
    option parsing with a structured, flag based conversion specification.  In
    doing so, it alters the internal `__gconv_open' interface and accordingly
    adjusts its uses.
    
    This change fixes several hangs in the iconv program and therefore includes
    a new test to exercise iconv_prog options that originally led to these hangs.
    It also includes a new regression test for option handling in the iconv
    function.
    
    Reviewed-by: Florian Weimer <fweimer>
    Reviewed-by: Siddhesh Poyarekar <siddhesh>
    Reviewed-by: Carlos O'Donell <carlos>

Comment 11 Arjun Shankar 2020-10-19 19:53:06 UTC
This commit is also needed. I will include it when I do the backport, but
just wanted to mention it here on bugzilla.

commit 7d4ec75e111291851620c6aa2c4460647b7fd50d
Author: Arjun Shankar <arjun>
Date:   Fri Sep 25 14:47:06 2020 +0200

    intl: Handle translation output codesets with suffixes [BZ #26383]
    
    Commit 91927b7c7643 (Rewrite iconv option parsing [BZ #19519]) did not
    handle cases where the output codeset for translations (via the `gettext'
    family of functions) might have a caller specified encoding suffix such as
    TRANSLIT or IGNORE.  This led to a regression where translations did not
    work when the codeset had a suffix.
    
    This commit fixes the above issue by parsing any suffixes passed to
    __dcigettext and adds two new test-cases to intl/tst-codeset.c to
    verify correct behaviour.  The iconv-internal function __gconv_create_spec
    and the static iconv-internal function gconv_destroy_spec are now visible
    internally within glibc and used in intl/dcigettext.c.

Comment 12 Arjun Shankar 2020-11-04 17:41:31 UTC
One final addition. This closes out all known hangs:

commit 9a99c682144bdbd40792ebf822fe9264e0376fb5
Author: Arjun Shankar <arjun>
Date:   Wed Nov 4 12:19:38 2020 +0100

    iconv: Accept redundant shift sequences in IBM1364 [BZ #26224]
    
    The IBM1364, IBM1371, IBM1388, IBM1390 and IBM1399 character sets
    share converter logic (iconvdata/ibm1364.c) which would reject
    redundant shift sequences when processing input in these character
    sets.  This led to a hang in the iconv program (CVE-2020-27618).
    
    This commit adjusts the converter to ignore redundant shift sequences
    and adds test cases for iconv_prog hangs that would be triggered upon
    their rejection.  This brings the implementation in line with other
    converters that also ignore redundant shift sequences (e.g. IBM930
    etc., fixed in commit 692de4b3960d).
    
    Reviewed-by: Carlos O'Donell <carlos>

Comment 14 Arjun Shankar 2020-11-10 16:25:19 UTC
The build also fixes bug 1894669 since the failures are similar and can be tested together.
The fix comes with two tests: iconv/tst-iconv-opt and iconv/tst-iconv_prog that both ran
and passed during build.

Comment 21 errata-xmlrpc 2021-05-18 14:36:34 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: glibc security, 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/RHSA-2021:1585


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