Bug 703104

Summary: [PATCH] Use-after-free() when eval in variable assignments reassigns the same variable
Product: [Fedora] Fedora Reporter: Lubomir Rintel <lkundrak>
Component: makeAssignee: Petr Machata <pmachata>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mnewsome, pmachata
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 699911 Environment:
Last Closed: 2011-06-22 12:30:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 699911    
Bug Blocks:    

Description Lubomir Rintel 2011-05-09 09:56:21 UTC
+++ This bug was initially created as a clone of Bug #699911 +++

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 Petr Machata 2011-06-22 12:30:49 UTC
Thanks for adding the patch.