From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd_sf: Fix problem with "sf update" and unaligned length
Date: Wed, 22 Apr 2015 13:15:07 +0200 [thread overview]
Message-ID: <553782BB.6050901@denx.de> (raw)
In-Reply-To: <CAD6G_RRGjwWi34OrMEhu4n7rfU3ae-jU+YxhHaRJ2P6v+afonw@mail.gmail.com>
On 22.04.2015 13:11, Jagan Teki wrote:
>> On 12.01.2015 22:10, Wolfgang Denk wrote:
>>>>>
>>>>> Should we add a memset(buf, 0, sizeof(buf)) before the memcpy() to
>>>>> prevent information from earlier activities to leak?
>>>>
>>>>
>>>> "buf" points to the new data to be written into the flash. We're
>>>> overwriting the first "len" bytes of "cmp_buf" with this data.
>>>
>>>
>>> Oh, sorry for the mixup. Then cmp_buf should be cleared (or at elast
>>> the remaining, unused part).
>>
>>
>> No. cmp_buf contains the original data from the flash. And only the
>> beginning of this buffer is overwritten with the new data from "buf". So,
>> the result of the memcpy() is that "cmp_buf" contains the data that should
>> be written into the flash. Its a combination of the "original data" and the
>> "new data".
>>
>>>> I don't see why we should erase anything there. Perhaps I'm missing
>>>> something though.
>>>
>>>
>>> You are leaking data. This could contain "interesting" information;
>>> see the OpenSSL ?Heartbleed? vulnerability for a (nasty) example what
>>> information leakage can do.
>>
>>
>> There is nothing leaking here. When anything would be zeroed out, the
>> resulting buffer would not be the one that should be used.
>
> I think this thread link got stopped any further update on this.
I would have thought that this patch had been applied some time ago. If
not, then please do.
Thanks,
Stefan
next prev parent reply other threads:[~2015-04-22 11:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 13:39 [U-Boot] [PATCH] cmd_sf: Fix problem with "sf update" and unaligned length Stefan Roese
2015-01-12 7:17 ` Wolfgang Denk
2015-01-12 7:27 ` Stefan Roese
2015-01-12 8:07 ` Gerlando Falauto
2015-01-12 21:12 ` Wolfgang Denk
2015-01-12 21:10 ` Wolfgang Denk
2015-01-13 6:05 ` Stefan Roese
2015-04-22 11:11 ` Jagan Teki
2015-04-22 11:15 ` Stefan Roese [this message]
2015-04-22 11:26 ` Jagan Teki
2015-01-12 7:51 ` Gerlando Falauto
2015-01-12 7:56 ` Stefan Roese
2015-01-12 8:12 ` Gerlando Falauto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=553782BB.6050901@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.