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 1207803 - wrong parsing inside for loop and brackets
Summary: wrong parsing inside for loop and brackets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bash
Version: 6.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Siteshwar Vashisht
QA Contact: Martin Kyral
Petr Bokoc
URL:
Whiteboard:
Depends On:
Blocks: 1254457
TreeView+ depends on / blocked
 
Reported: 2015-03-31 18:27 UTC by Petr Stodulka
Modified: 2016-05-10 20:50 UTC (History)
4 users (show)

Fixed In Version: bash-4.1.2-40.el6
Doc Type: Bug Fix
Doc Text:
Command substitution now works inside arithmetic expressions in *bash* Previously, *bash* did not save input line state across recursive calls to the shell parser, causing the shell to fail to parse command substitution inside arithmetic expressions. For example, the following command failed: for point in "/boot"; do disk_dir["$( df -P $point | awk '{print $1}' )"]=1; done This bug has been fixed, *bash* now saves input line state before making recursive calls to the parser, and command substitution now works inside arithmetic expressions.
Clone Of:
Environment:
Last Closed: 2016-05-10 20:50:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0800 0 normal SHIPPED_LIVE bash bug fix update 2016-05-10 22:37:56 UTC

Description Petr Stodulka 2015-03-31 18:27:03 UTC
Description of problem:
Wrong parsing inside for cycle when associative array is used with substitution inside brackets.

How reproducible:
Always with old bash version 4.1.2.

Steps to Reproduce:
$ for point in "/boot"; do disk_dir["$( df -P $point | awk '{print $1}' )"]=1; done


Additional info:
$rpm -q bash
bash-4.1.2-33.el6.x86_64

I can't reproduce it with version 4.3.33 on Fedora 21.

Comment 1 Ondrej Oprala 2015-07-07 09:35:03 UTC
This seems to be fixed by bash42-053...backport shouldn't be a problem.

Comment 9 Siteshwar Vashisht 2016-04-28 09:22:49 UTC
This was actually fixed by backporting bash42-012 (and not bash42-053 as mentioned in comment#1).

Comment 13 errata-xmlrpc 2016-05-10 20:50:00 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, 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://rhn.redhat.com/errata/RHBA-2016-0800.html


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