hottub.patents
US 12,216,922 B2#2237807 Most CitedActiveUnited States (USPTO)Utility

Updating encrypted security context in stack pointers for exception handling and tight bounding of on-stack arguments

1Forward Citations (#2237807 Global)
1.0/yrCitation Velocity (#2237807 Global)
0.17Citation PageRank (#2237807 Global)
23Prior Art Cited
8Structured Claims
0Drawings / Sheets

Abstract

A processor is to execute a first instruction to perform a simulated return in a program from a callee function to a caller function based on a first input stack pointer encoded with a first security context of a first callee stack frame. To perform the simulated return is to include generating a first simulated stack pointer to the caller stack frame. The processor is further to, in response to identifying an exception handler in the first caller function, execute a second instruction to perform a simulated call based on a second input stack pointer encoded with a second security context of the caller stack frame. To perform the simulated call is to include generating a second simulated stack pointer to a new stack frame containing an encrypted instruction pointer associated with the exception handler. The second simulated stack pointer is to be encoded with a new security context.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 23 · Forward citations: 1.

Claims (8)

  1. Claim 1Independent Claim

    An apparatus comprising: a processor to be coupled to a memory to store code, the processor to: execute a first instruction to perform a first simulated return in a program from a callee function to a caller function based on a first input stack pointer encoded with a first security context of a callee stack frame, wherein the first simulated return is to simulate a normal return from the callee function that is cryptographically protected, wherein to perform the first simulated return is to include: generating a first simulated stack pointer to a caller stack frame; and in response to identifying an exception handler in the caller function, execute a second instruction to perform a simulated call based on a second input stack pointer encoded with a second security context of the caller stack frame, wherein the simulated call is to simulate a normal call from the caller function that is cryptographically protected, wherein to perform the simulated call is to include: generating a secon

  2. Claim 2Depends on #1

    The apparatus of claim 1, wherein the first instruction is to be executed in response to an exception occurring in a last called function of a plurality of functions called in the program.

  3. Claim 3Depends on #1

    The apparatus of claim 1, wherein the first input stack pointer is to be obtained from a register entry in an unwind context of an unwinder data structure, the register entry to include a first value of a stack pointer register, the first value pointing to an end of the caller stack frame and encoded with the first security context of the callee stack frame.

  4. Claim 4Depends on #3

    The apparatus of claim 3, wherein the first security context includes a first base address of the callee stack frame.

  5. Claim 5Depends on #4

    The apparatus of claim 4, wherein the first base address of the callee stack frame contains an encrypted return address, and wherein the second input stack pointer is to point to a location in the new stack frame.

  6. Claim 6Depends on #5

    The apparatus of claim 5, wherein to perform the first simulated return is to include: loading the encrypted return address from the callee stack frame based on the first base address obtained from the first security context encoded in the first input stack pointer; and generating a decrypted return address by decrypting the encrypted return address based, at least in part, on a first data tweak associated with the first security context in the first input stack pointer.

  7. Claim 7Depends on #6

    The apparatus of claim 6, wherein the first data tweak includes data that represents at least a portion of the first security context.

  8. Claim 8Depends on #6

    The apparatus of claim 6, wherein the generating the first simulated stack pointer for the caller stack frame is to further include: updating the first security context encoded in the first input stack pointer to the second security context of the caller stack frame; and encrypting at least a portion of the second security context.

Technical Overview & Description

TECHNICAL FIELD This disclosure relates in general to the field of computer systems, more particularly, to updating encrypted security context in stack pointers for exception handling and tight bounding of on-stack arguments. BACKGROUND Memory safety issues on the stack have been a persistent cause of security vulnerabilities, both targeting adjacent data on the stack as well as control flow parameters such as the return address. Safety issues that permit a stack buffer overrun can provide read or write access to data on a caller's stack frame and the return pointer, allowing a compromised callee to subvert control of the execution environment. Even if stack pointers are isolated to access only one stack frame, some programming patterns may permit access to stacks. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a simplified block diagram of an example computing device configured with secure memory access logic according to at least one embodiment of the present disclosure. FIG. 2 A is flow diagram illustrating a process of binding a generalized encoded pointer to encryption of data referenced by that pointer according to at least one embodiment of the present disclosure. FIG. 2 B is flow diagram illustrating a process of decrypting data bound to a generalized encoded pointer according to at least one embodiment of the present disclosure. FIG. 3 illustrates example frames on a stack and corresponding encoded stack pointers in accordance with one or more embodiments of the present disclosure. FIGS. 4 A- 4 B illustrate example stack pointer formats that may be used in certain embodiments of the present disclosure. FIGS. 5 A and 5 B are flow diagrams of example processes for using stack pointers (e.g., those in FIGS. 4 A- 4 B ) according to at least one embodiment of the present disclosure. FIGS. 6 A-

Cited By — Indexed Forward Citations (1 of 1 total)

References Cited — Backward Prior Art (23)

PatentTitleYearCitations

Non-Patent Literature (10)

  • “
  • Armv8.5-A Memory Tagging Extension,
  • ”
  • Arm, White Paper, Aug. 2, 2019, 9 pages, retrieved from https://developer.arm.com/documentation/102925/0100.
  • “
  • Pointer Authentication on ARMv8.3, Design and Analysis of the New Software Security Instructions,
  • ”
  • Qualcomm Technologies, Inc., Jan. 2017, 12 pages, retrieved from https://www.qualcomm.com/content/dam/qcomm-martech/dm-assets/documents/pointer-auth-v7.pdf.
  • Aman Singla,
  • “