Bug 699911 - [PATCH] Use-after-free() when eval in variable assignments reassigns the same variable
[PATCH] Use-after-free() when eval in variable assignments reassigns the same...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: make (Show other bugs)
6.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Petr Machata
qe-baseos-tools
:
Depends On:
Blocks: 703104
  Show dependency treegraph
 
Reported: 2011-04-26 18:07 EDT by Lubomir Rintel
Modified: 2015-05-04 21:36 EDT (History)
4 users (show)

See Also:
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 11:21:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Proposed fix (1.65 KB, patch)
2011-04-26 18:07 EDT, Lubomir Rintel
no flags Details | Diff

  None (edit)
Description Lubomir Rintel 2011-04-26 18:07:27 EDT
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 18:09:52 EDT
Affects Fedora as well, I'd be very thankful if this could make it into f15, if not a f14 update.
Comment 3 RHEL Product and Program Management 2011-04-26 18:37:35 EDT
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 08:40:01 EDT
Bug confirmed, patch fixes the issue.
Comment 7 Eliska Slobodova 2011-12-14 08:12:08 EST
    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 11:21:04 EDT
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

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