[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/16192] New: [PATCH] * ld/pe-dll.c: clear memory after allo
From: |
erinn at torproject dot org |
Subject: |
[Bug binutils/16192] New: [PATCH] * ld/pe-dll.c: clear memory after allocating it but before using it. |
Date: |
Wed, 20 Nov 2013 02:21:46 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=16192
Bug ID: 16192
Summary: [PATCH] * ld/pe-dll.c: clear memory after allocating
it but before using it.
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: erinn at torproject dot org
Created attachment 7286
--> http://sourceware.org/bugzilla/attachment.cgi?id=7286&action=edit
[PATCH] * ld/pe-dll.c: clear memory after allocating it but before using it.
I work for The Tor Project and in the process of working on deterministic
builds of win64 we discovered that there were phantom bytes we couldn't account
for. After researching for a few days, one of our developers found the cause
and I'm attaching a patch for ld in binutils. This patch is a few days old but
should still apply cleanly to master. The text to explain the bug better:
Currently, in pe-dll.c , extern_rt_rel_d is allocated but not cleared before
using it. This leads (apparently) to uninitialized heap contents leaking into
the generated files, which is a problem for reproducible builds. It appears
that elsewhere in pe-dll.c, the pattern is to clear memory like this after
allocating it but before using it. That's the approach that this patch takes.
Patch written by bobnomnom.
The fix has been tested in both win64 and win32 in our Gitian infrastructure
and successfully creates reproducible, identical binaries.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/16192] New: [PATCH] * ld/pe-dll.c: clear memory after allocating it but before using it.,
erinn at torproject dot org <=