public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/16462] New: memcpy corrupted the data
@ 2014-01-17 5:59 glin at suse dot com
2014-01-17 5:59 ` [Bug libc/16462] " glin at suse dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: glin at suse dot com @ 2014-01-17 5:59 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
Bug ID: 16462
Summary: memcpy corrupted the data
Product: glibc
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: glin at suse dot com
CC: drepper.fsp at gmail dot com
While building OVMF with glibc 2.18, some data in the intermediate C file were
corrupted. With git bisect, the culprit was identified:
https://sourceware.org/git/?p=glibc.git;a=commit;h=2d48b41c8fa610067c4d664ac2339ae6ca43e78c
After reverting the patch, everything works again.
Steps to reproduce:
1. clone the edk2 source code from https://github.com/tianocore/edk2
2. build the utility program with glibc 2.18
$ make -C BaseTools/
3. generate the intermediate C file with the attached files
./BaseTools/Source/C/bin/VfrCompile -l -n --string-db
SecureBootConfigDxeStrDefs.hpk --output-directory . SecureBootConfig.i
4. compare the generated SecureBootConfig.c with the correct one (attached
later)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
@ 2014-01-17 5:59 ` glin at suse dot com
2014-01-17 6:00 ` glin at suse dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: glin at suse dot com @ 2014-01-17 5:59 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
--- Comment #1 from Gary Lin <glin at suse dot com> ---
Created attachment 7359
--> https://sourceware.org/bugzilla/attachment.cgi?id=7359&action=edit
SecureBootConfigDxeStrDefs.hpk
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
2014-01-17 5:59 ` [Bug libc/16462] " glin at suse dot com
2014-01-17 6:00 ` glin at suse dot com
@ 2014-01-17 6:00 ` glin at suse dot com
2014-01-17 6:03 ` glin at suse dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: glin at suse dot com @ 2014-01-17 6:00 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
--- Comment #3 from Gary Lin <glin at suse dot com> ---
Created attachment 7361
--> https://sourceware.org/bugzilla/attachment.cgi?id=7361&action=edit
expected SecureBootConfig.c
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
2014-01-17 5:59 ` [Bug libc/16462] " glin at suse dot com
@ 2014-01-17 6:00 ` glin at suse dot com
2014-01-17 6:00 ` glin at suse dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: glin at suse dot com @ 2014-01-17 6:00 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
--- Comment #2 from Gary Lin <glin at suse dot com> ---
Created attachment 7360
--> https://sourceware.org/bugzilla/attachment.cgi?id=7360&action=edit
SecureBootConfig.i
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
` (2 preceding siblings ...)
2014-01-17 6:00 ` glin at suse dot com
@ 2014-01-17 6:03 ` glin at suse dot com
2014-01-17 7:35 ` aj at suse dot de
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: glin at suse dot com @ 2014-01-17 6:03 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
--- Comment #4 from Gary Lin <glin at suse dot com> ---
Created attachment 7362
--> https://sourceware.org/bugzilla/attachment.cgi?id=7362&action=edit
OVMF patch to workaround the bug
It seems only one line in BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp is
really affected. Replacing memcpy in the line with my own memcpy fixed my
problem.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
` (4 preceding siblings ...)
2014-01-17 7:35 ` aj at suse dot de
@ 2014-01-17 7:35 ` aj at suse dot de
2014-01-17 8:36 ` glin at suse dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: aj at suse dot de @ 2014-01-17 7:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |neleai at seznam dot cz
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
` (3 preceding siblings ...)
2014-01-17 6:03 ` glin at suse dot com
@ 2014-01-17 7:35 ` aj at suse dot de
2014-01-17 7:35 ` aj at suse dot de
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: aj at suse dot de @ 2014-01-17 7:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aj at suse dot de
--- Comment #5 from Andreas Jaeger <aj at suse dot de> ---
Change is:
Faster memcpy on x64.
We add new memcpy version that uses unaligned loads which are fast
on modern processors. This allows second improvement which is avoiding
computed jump which is relatively expensive operation.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
` (5 preceding siblings ...)
2014-01-17 7:35 ` aj at suse dot de
@ 2014-01-17 8:36 ` glin at suse dot com
2014-01-17 11:10 ` schwab@linux-m68k.org
2014-06-13 8:55 ` fweimer at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: glin at suse dot com @ 2014-01-17 8:36 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
Gary Lin <glin at suse dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Gary Lin <glin at suse dot com> ---
I found the line caused the problem actually copied the overlapped buffer, and
the new memcpy exposed the bug. Sorry for the noise.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
` (6 preceding siblings ...)
2014-01-17 8:36 ` glin at suse dot com
@ 2014-01-17 11:10 ` schwab@linux-m68k.org
2014-06-13 8:55 ` fweimer at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2014-01-17 11:10 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
--- Comment #7 from Andreas Schwab <schwab@linux-m68k.org> ---
valgrind can find such problems.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/16462] memcpy corrupted the data
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
` (7 preceding siblings ...)
2014-01-17 11:10 ` schwab@linux-m68k.org
@ 2014-06-13 8:55 ` fweimer at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 8:55 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16462
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-06-13 8:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-17 5:59 [Bug libc/16462] New: memcpy corrupted the data glin at suse dot com
2014-01-17 5:59 ` [Bug libc/16462] " glin at suse dot com
2014-01-17 6:00 ` glin at suse dot com
2014-01-17 6:00 ` glin at suse dot com
2014-01-17 6:03 ` glin at suse dot com
2014-01-17 7:35 ` aj at suse dot de
2014-01-17 7:35 ` aj at suse dot de
2014-01-17 8:36 ` glin at suse dot com
2014-01-17 11:10 ` schwab@linux-m68k.org
2014-06-13 8:55 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).