Bug 699911

Summary: [PATCH] Use-after-free() when eval in variable assignments reassigns the same variable
Product: Red Hat Enterprise Linux 6 Reporter: Lubomir Rintel <lkundrak>
Component: makeAssignee: Petr Machata <pmachata>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: mnewsome, patrickm, pmuller, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Prior to this update, memory corruption could occur in an "eval" expression if one of its sub-expressions was assigned to the same variable. An upstream patch has been applied to address this issue, and memory corruption no longer appears in the described scenario.
Story Points: ---
Clone Of:
: 703104 (view as bug list) Environment:
Last Closed: 2012-04-03 15:21:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 703104    
Attachments:
Description Flags
Proposed fix none

Description Lubomir Rintel 2011-04-26 22:07:27 UTC
Created attachment 495050 [details]
Proposed fix

In real world, such memory corruption occurs when using eval constructs for lazy assignment:

VARIABLE = $(eval VARIABLE := $(shell long-slow-command)$(VARIABLE)

Upstream submission: https://savannah.gnu.org/patch/index.php?7534

Comment 1 Lubomir Rintel 2011-04-26 22:09:52 UTC
Affects Fedora as well, I'd be very thankful if this could make it into f15, if not a f14 update.

Comment 3 RHEL Program Management 2011-04-26 22:37:35 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 4 Petr Machata 2011-06-22 12:40:01 UTC
Bug confirmed, patch fixes the issue.

Comment 7 Eliska Slobodova 2011-12-14 13:12:08 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, memory corruption could occur in an "eval" expression if one of its sub-expressions was assigned to the same variable. An upstream patch has been applied to address this issue, and memory corruption no longer appears in the described scenario.

Comment 9 errata-xmlrpc 2012-04-03 15:21:04 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.

http://rhn.redhat.com/errata/RHBA-2012-0443.html