Pointer Authentication for Memory Protection: Stack Canaries and Beyond

dc.contributorAalto-yliopistofi
dc.contributorAalto Universityen
dc.contributor.advisorLiljestrand, Hans
dc.contributor.authorGauhar, Zaheer
dc.contributor.schoolPerustieteiden korkeakoulufi
dc.contributor.supervisorEkberg, Jan-Erik
dc.date.accessioned2019-08-25T15:10:32Z
dc.date.available2019-08-25T15:10:32Z
dc.date.issued2019-08-19
dc.description.abstractMemory corruption vulnerabilities, such as stack-based buffer overflows, continue to be a major threat for programs written in the C language. A widely deployed method for protecting against stack-based buffer overflows is to use stack canaries. However, the existing canary protection methods are vulnerable to memory disclosure. Moreover, with a significant increase in computing resources, they have also become vulnerable to brute-force attacks. Most existing implementations protect only the return address, leaving other variables in the function vulnerable to buffer overflow. Despite these shortcomings, these software-based stack protection methods incur significant performance overhead. The alternative, hardware-based defenses for stack, require drastic changes in underlying processor architecture. ARM has introduced Pointer Authentication (PA) primitives in the ARMv8.3-A architecture. PA provides resistance against memory errors by authenticating pointers at low-cost. PA also provides the capability to authenticate non-pointer values. In this work, we develop an LLVM compiler extension to detect buffer overflow attacks by using PA to generate and verify function-specific canaries. We use PA to generate keyed hashes on function entry, that are used as authenticated canaries and these hashes are verified on function exit. If the hash check fails, buffer overflow has occurred. Moreover, we protect all the buffers in a function using authenticated canaries. These authenticated canaries are chained together to detect overflow in any of the buffers. In our evaluation, we show that this approach provides resistance against brute-force attacks on canaries. Moreover, the hardware-based implementation of canary authentication has a negligible performance overhead, such that protecting all the buffers induces less than 1% overhead on SPEC CPU 2017 benchmarks.en
dc.format.extent83
dc.identifier.urihttps://aaltodoc.aalto.fi/handle/123456789/39884
dc.identifier.urnURN:NBN:fi:aalto-201908254945
dc.language.isoenen
dc.programmeMaster’s Programme in Computer, Communication and Information Sciencesfi
dc.programme.majorSecurity and Cloud Computingfi
dc.programme.mcodeSCI3084fi
dc.subject.keywordbuffer overflowen
dc.subject.keywordARM pointer authenticationen
dc.subject.keywordLLVMen
dc.subject.keywordCen
dc.subject.keywordstack canariesen
dc.titlePointer Authentication for Memory Protection: Stack Canaries and Beyonden
dc.typeG2 Pro gradu, diplomityöfi
dc.type.ontasotMaster's thesisen
dc.type.ontasotDiplomityöfi
local.aalto.electroniconlyyes
local.aalto.openaccessno

Files