Bug 1437111

Summary: glibc: Incorrect backport of “Clean up internal fopen uses” upstream patch
Product: Red Hat Enterprise Linux 6 Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: glibc team <glibc-bugzilla>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.9CC: ashankar, codonell, fweimer, jaroslaw.polok, mnewsome, pfrankli, rhbugs, thomas.oulevey
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-29 15:56:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Florian Weimer 2017-03-29 13:59:30 UTC
glibc-2.12-1.207.el6 backported this upstream commit:

commit 312be3f9f5eab1643d7dcc7728c76d413d4f2640
Author: Ulrich Drepper <drepper>
Date:   Tue Nov 15 04:24:42 2011 -0500

    Clean up internal fopen uses
    
    No need to ever not use c and e.

However, the backport contains this change:

-  memcpy (mempcpy (newmode, mode, modelen), "c", 2);
+  memcpy (mempcpy (newmode, mode, modelen), "ce", 2);

This is not correct, upstream uses 

   memcpy (mempcpy (newmode, mode, modelen), "ce", 3);

instead.

Comment 1 Florian Weimer 2017-03-29 14:00:33 UTC
Fist reported here: https://blogs.oracle.com/wim/entry/oracle_linux_6_update_9

(Via bug 1012343 comment 21.)

Comment 2 Anssi Johansson 2017-03-29 14:10:32 UTC
Do note that you will need to increase the size of the newmode array as well.

Comment 3 Carlos O'Donell 2017-03-29 15:56:05 UTC
I'm closing this as a duplicate of bug 1437147 because we need some additional fixes we missed in the original backport review.

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