[llvm-bugs] [Bug 25570] New: Combine SafeStack with StackProtector

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 18 17:17:47 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25570

            Bug ID: 25570
           Summary: Combine SafeStack with StackProtector
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Miscellaneous Instrumentation passes
          Assignee: unassignedbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

StackProtector can catch stack data corruption in the caller's stack frame.
SafeStack can not do this. For ultimate protection, we should combine the two.

It looks like the "safe" (i.e. system) stack does not require a protector
cookie, because all the scary allocations are moved away from it. We could run
the StackProtector pass after SafeStack, and that would add a cookie to the
safe stack if it deems necessary, but as StackProtector implementation is a bit
dumber than SafeStack it would add unnecessary cookies.

Instead SafeStack could be extended to add a cookie to the unsafe stack each
time a function has an unsafe frame. No extra logic required.

We would need to repeat (or factor out) the logic of obtaining a cookie value
found in CreatePrologue in StackProtector.cpp.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151119/72a47123/attachment.html>


More information about the llvm-bugs mailing list