Hey David,<br><br>I'd love to discuss and/or have a look at your implementation. Szabolcs brings up some very good points about the difficulty of doing this correctly. Are you at the point where you're willing to share your work?<div><br></div><div>Thanks,</div><div>Russ Harmon</div><br><div class="gmail_quote">On Sat Sep 13 2014 at 1:03:01 AM David Chisnall <<a href="mailto:David.Chisnall@cl.cam.ac.uk">David.Chisnall@cl.cam.ac.uk</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Russel,<br>
<br>
I didn't realise that Colin had blogged about it. We've discussed it a few times in the past and I have an implementation of it that we are evaluating.<br>
<br>
David<br>
<br>
On 12 Sep 2014, at 03:30, Russell Harmon <<a href="mailto:eatnumber1@google.com" target="_blank">eatnumber1@google.com</a>> wrote:<br>
<br>
> I've been thinking about the issues with securely zero'ing buffers that Colin Percival discusses in his blog article, and I think I'd like to take a stab at fixing it in clang. Here's my proposal:<br>
><br>
> Add a function attribute, say __attribute__((clear_regs_on_<u></u>return)) which when a thus annotated function returns will zero all callee owned registers and spill slots. Then, all unused caller owned registers will be immediately cleared by the caller after return.<br>
><br>
> As for why, I'm concerned with the case where a memory disclosure vulnerability exposes all or a portion of sensitive data via either spilled registers or infrequently used registers (xmm). If an attacker is able to analyze a binary for situations wherein sensitive data will be spilled, leveraging a memory disclosure vulnerability it's likely one could craft an exploit that reveals sensitive data.<br>
><br>
> What does the list think?<br>
> -Russ Harmon<br>
> ______________________________<u></u>_________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote></div>