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 1389492 - zsh crash in --no-exec and emulation mode if accessing the HOME environment variable
Summary: zsh crash in --no-exec and emulation mode if accessing the HOME environment v...
Keywords:
Status: CLOSED DUPLICATE of bug 1267251
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: zsh
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Kamil Dudka
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-27 17:58 UTC by Paulo Andrade
Modified: 2019-12-16 07:15 UTC (History)
2 users (show)

Fixed In Version: zsh-5.0.2-17.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-31 12:35:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
zsh-bz1389492.patch (1.41 KB, patch)
2016-10-28 11:59 UTC, Paulo Andrade
no flags Details | Diff

Description Paulo Andrade 2016-10-27 17:58:23 UTC
Simple reproducer:

"""
$ ln -sf /bin/zsh ksh
$ cat t.sh
# !/bin/sh
echo $HOME
$ ./ksh -n t.sh
"""

  Problem has also been reported to upstream, with
an initial possible patch:

"""
--- zsh-5.0.2/Src/init.c.orig	2016-10-27 15:36:29.210875166 -0200
+++ zsh-5.0.2/Src/init.c	2016-10-27 15:36:33.581867451 -0200
@@ -963,7 +963,7 @@ setupvals(void)
     if (EMULATION(EMULATE_ZSH))
 	ptr = home;
     else
-	ptr = zgetenv("HOME");
+	ptr = home = zgetenv("HOME");
     if (ptr && ispwd(ptr))
 	pwd = ztrdup(ptr);
     else if ((ptr = zgetenv("PWD")) && (strlen(ptr) < PATH_MAX) &&
"""

Comment 2 Paulo Andrade 2016-10-28 11:59:32 UTC
Created attachment 1214975 [details]
zsh-bz1389492.patch

Upstream patch. Needs edit as ChangeLog diff will not apply.

Comment 3 Kamil Dudka 2016-10-30 21:01:49 UTC
Please remember to report the exact NVR (Name-Version-Release) of the package you tested it with.  Is this a duplicate of bug #1267251?

Comment 4 Paulo Andrade 2016-10-31 11:56:45 UTC
It is indeed a duplicate of #1267251
Package was zsh-5.0.2-14.el7_2.2

Comment 5 Kamil Dudka 2016-10-31 12:35:43 UTC

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


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