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 1901030

Summary: tcsh segfaults if non-ASCII characters are entered in a terminal configured to use 8-bit characters and LANG=en_US.UTF-8
Product: Red Hat Enterprise Linux 8 Reporter: Carlos Santos <casantos>
Component: tcshAssignee: Siteshwar Vashisht <svashisht>
Status: CLOSED WONTFIX QA Contact: Karel Volný <kvolny>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.3CC: alrodrig, chorn, johan.burati, mkolbas, sujagtap
Target Milestone: rcFlags: pm-rhel: mirror+
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: 2023-07-10 12:06:10 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 Carlos Santos 2020-11-24 10:33:35 UTC
Description of problem:

tcsh segfaults if non-ascii characters are entered in a terminal configured to
use 8-bit characters and LANG=en_US.UTF-8.

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

tcsh-6.20.00-12.el8.x86_64

How reproducible:

always

Steps to Reproduce:

1. Use a terminal emulator (e.g. Gnome Terminal) configured for ISO8859-1.
2. Set locale/LANG to en_US.UTF-8.
3. Run tcsh.
4. Enter some non-ascii characters on the command line (e.g. ç ã ä).

Actual results:

The shell segfaults efter a short while. Pressing return, backspace or any
other key 5 times makes it crash faster.

Expected results:

tcsh should not crash

Additional info:

The problem has been fixed in tcsh 6.21 by the following commits

commit 49abb8817d18103cf3988df80c7ca0ded63b6596
Author: zoulasc <christos>
Date:   Fri Apr 26 16:09:39 2019 -0400

    Fix prototype inconsistency (Corinna Vinschen)

commit e120c55b6da0b68ef7adec3158ff5c45b14c52e7
Author: Amol Deshpande <amold.com>
Date:   Tue Feb 26 06:30:09 2019 +0000

    Accidentally reversed #ifdef

commit a7a11fda9081a214f1c0a7cd777ce709c22ed27c
Author: Amol Deshpande <amold.com>
Date:   Tue Feb 26 06:24:33 2019 +0000

    Fix breakage of NT bindkeys

commit 1a9cf9aae4674b93f163a81ffab5457299fb10e1
Author: zoulasc <christos>
Date:   Sun Dec 16 13:42:28 2018 -0500

    Fix PR/37: Segv on array dereference.

commit 97449dbf9c0f1bdeb9ce580658f9a325cff07a03
Author: zoulasc <christos>
Date:   Fri Apr 28 09:14:30 2017 -0400

    Handle 8-bit characters in bindkey (Dr. Werner Fink)

commit 8e6dfd53321a0b0047f7d75db21a946c166c600b
Author: Christos Zoulas <christos>
Date:   Fri Feb 17 11:17:27 2017 -0500

    Unfortunately the AsciiOnly reversion causes a SEGV because *ch
    is used to index in the command array, and now contains INVALID_BYTE.
    env -i ./tcsh
    <meta>b

tcsh-6.20.00-12.el8 has commit 8e6dfd53321a0b0047f7d75db21a946c166c600b
applied as tcsh-6.20.00-008-guard-ascii-only-reversion.patch. I suggest to
either cherry-pick the missing five patches or upgrade to 6.21.