# US 9,436,847 B2 · Cryptographic pointer address encoding

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,436,847 B2
- Document ID: US9436847B2
- Status: Granted
- Kind: B2
- Application number: 14/498,540
- Filed: 2014-09-26
- Published: 2016-03-31
- Granted: 2016-09-06
- Earliest claimed: 2014-09-26
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: David M. Durham; Baiju Patel
- Web page: https://patentgrep.com/patent/US9436847B2

## CPC

- G06F 9/34: Addressing or accessing the instruction operand or the result {; Formation of operand address; Addressing modes (address translation G06F12/00)}
- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- G06F 9/35: Indirect addressing
- G06F 21/556: {involving covert channels, i.e. data leakage between processes (inhibiting the analysis of circuitry or operation with measures against power attack G06F21/755)}
- G06F 21/72: in cryptographic circuits
- H04L 63/0435: {wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption (cryptographic mechanisms or cryptographic arrangements for symmetric key encryption H04L9/06)}
- H04L 63/061: {for key exchange, e.g. in peer-to-peer networks (cryptographic mechanisms or cryptographic arrangements for key agreement H04L9/0838)}
- H04L 63/1433: {Vulnerability analysis}
- G06F 2212/1052: Security improvement
- G06F 2221/034: Test or assess a computer or a system
- G06F 2221/2107: File encryption
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A computing device includes technologies for securing indirect addresses (e.g., pointers) that are used by a processor to perform memory access (e.g., read/write/execute) operations. The computing device encodes the indirect address using metadata and a cryptographic algorithm. The metadata may be stored in an unused portion of the indirect address.

## Claims

### Claim 1

A computing device to cryptographically encode indirect addresses, the computing device comprising:
a processor comprising address encoding logic to encode an indirect address during execution of a computer program and on a memory allocation operation that allocates memory and returns the indirect address, wherein the indirect address comprises a plurality of unused bits and a plurality of used bits, and wherein the used bits are to store data indicative of a memory location of the allocated memory,
wherein to encode the indirect address comprises to:
determine metadata associated with the indirect address, the metadata indicative of a memory access permitted by the indirect address;
store the metadata in the unused bits of the indirect address;
determine a portion of the indirect address to encrypt based on the metadata;
encrypt the determined portion of the indirect address; and
output of the encoded indirect address for use by a memory access instruction.

### Claim 2 (depends on 1)

The computing device of claim 1, wherein the metadata comprises an upper limit on the size of the allocated memory, and the address encoding logic is to determine the upper limit on the size of the allocated memory by selection of a two's power boundary as the upper limit, and the address encoding logic is to store the exponent of the selected two's power boundary as range metadata in the unused bits of the indirect address.

### Claim 3 (depends on 2)

The computing device of claim 2, wherein the address encoding logic is to determine the portion of the indirect address to encrypt based on the selected two's power boundary.

### Claim 4 (depends on 2)

The computing device of claim 2, wherein the address encoding logic is to modify the range metadata by application of an adjustment value to the two's power boundary.

### Claim 5 (depends on 4)

The computing device of claim 4, wherein the address encoding logic is to store the adjustment value in the unused bits of the indirect address.

### Claim 6 (depends on 4)

The computing device of claim 4, wherein the address encoding logic is to determine the adjustment value based on a location of a most significant bit of the used bits of the indirect address in relation to the two's power boundary.

### Claim 7 (depends on 1)

The computing device of claim 1, wherein the address encoding logic is to store the data indicative of the upper limit on the size of the allocated memory in the unused bits of the indirect address.

### Claim 8 (depends on 1)

The computing device of claim 1, wherein the determined portion of the indirect address comprises the used bits of the indirect address, and the address encoding logic is to cause the processor to encrypt the used bits of the indirect address.

### Claim 9 (depends on 8)

The computing device of claim 8, wherein the address encoding logic is to store the adjustment value in the unused bits of the indirect address, the determined portion of the indirect address comprises the unused bits of the indirect address in which the adjustment value is stored, and the address encoding logic is to encrypt the adjustment value stored in the unused of the indirect address and the used bits of the indirect address.

### Claim 10 (depends on 1)

The computing device of claim 1, wherein the address encoding logic is to: determine the upper limit on the buffer size by selecting a two's power boundary as the upper limit on the buffer size and applying an adjustment value to the two's power boundary, and store the exponent of the selected two's power boundary and the adjustment value in the unused bits of the indirect address.

### Claim 11 (depends on 10)

The computing device of claim 10, wherein the address encoding logic is to encrypt the determined portion of the indirect address by execution of a tweakable block cipher with a secret key and with the exponent of the selected two's power boundary stored in the unused bits of the indirect address as a tweak.

### Claim 12 (depends on 11)

The computing device of claim 11, wherein the address encoding logic is to encrypt the determined portion of the indirect address by execution of a tweakable block cipher with the adjustment value stored in the unused bits of the indirect address as a tweak.

### Claim 13 (depends on 1)

The computing device of claim 1, wherein the address encoding logic is to encrypt the determined portion of the indirect address by execution of a tweakable block cipher with a secret key and with a code block identifier as a tweak, wherein the code block identifier is indicative of a block of code of the computer program that is to execute the memory allocation operation.

### Claim 14 (depends on 1)

The computing device of claim 1, wherein the address encoding logic is to encrypt the determined portion of the indirect address by execution of a tweakable block cipher with instruction pointer data as a tweak, wherein the instruction pointer data is indicative of a block of code from which an instruction of the computer program is to execute the memory allocation operation.

### Claim 15 (depends on 1)

The computing device of claim 1, wherein the address encoding logic is to: encode an instruction pointer with metadata indicative of a memory access permitted by the instruction pointer and an adjustment value, and encrypt the indirect address using the encoded instruction pointer as a tweak.

### Claim 16 (depends on 1)

The computing device of claim 1, comprising address decoding logic to, during execution of a computer program and on a memory access operation involving memory and a register, obtain the encoded indirect address and decrypt the encrypted portion of the encoded address using the secret key and a tweak.

### Claim 17 (depends on 16)

The computing device of claim 16, wherein the address decoding logic is to return the decrypted address to its original form by removal of the data stored in the unused bits of the indirect address.

### Claim 18 (depends on 1)

The computing device of claim 1, wherein the address encoding logic is to encrypt the determined portion of the indirect address with a tweakable block cipher and the tweak used by the tweakable block cipher comprises one or more of: data stored in the unused bits of the indirect address, the upper limit on the buffer size, an exponent of a two's power boundary selected as the upper limit on the buffer size, an adjustment value applied to the two's power boundary, a code block identifier, instruction pointer data, and permission information encoded in the metadata.

### Claim 19

A method for securing indirect addresses to mitigate buffer overflow attacks, the method comprising:
causing a processor to encode an indirect address during execution of a computer program and on a memory allocation operation that allocates memory for a buffer and returns an indirect address, wherein the indirect address comprising a plurality of unused bits and a plurality of used bits, and wherein the used bits to store data indicating a memory location of the buffer,
wherein causing the processor to encode the indirect address comprises:
determining an upper limit on the size of the buffer;
storing data indicative of the upper limit on the buffer size in the unused bits of the indirect address;
determining a portion of the indirect address to encrypt based on the data indicative of the upper limit on the buffer size;
encrypting the determined portion of the indirect address; and
outputting the encoded indirect address for use by a memory access instruction of the processor.

### Claim 20

One or more non-transitory machine readable storage media comprising a plurality of instructions stored thereon that, in response to being executed, cause a computing device to:
encode an indirect address during execution of a computer program and on a memory allocation operation that allocates memory for a buffer and returns an indirect address, wherein the indirect address comprising a plurality of unused bits and a plurality of used bits, and wherein the used bits to store data indicating a memory location of the buffer,
wherein to encode the indirect address comprises to:
determine an upper limit on the size of the buffer;
store data indicative of the upper limit on the buffer size in the unused bits of the indirect address;
determine a portion of the indirect address to encrypt based on the data indicative of the upper limit on the buffer size;
encrypt the determined portion of the indirect address; and
output the encoded indirect address for use by a memory access instruction of the processor.

### Claim 21 (depends on 20)

The one or more non-transitory machine readable storage media of claim 20, wherein the determined portion of the indirect address comprises the used bits of the indirect address, and the instructions result in the computing device encrypting the used bits of the indirect address.

### Claim 22 (depends on 21)

The one or more non-transitory machine readable storage media of claim 21, wherein the instructions result in the computing device storing the adjustment value in the unused bits of the indirect address, and, wherein the determined portion of the indirect address comprises the unused bits of the indirect address in which the adjustment value is stored, encrypting the unused bits of the indirect address in which the adjustment value is stored.

### Claim 23 (depends on 20)

The one or more non-transitory machine readable storage media of claim 20, wherein the instructions result in the computing device: determining the upper limit on the buffer size by selecting a two's power boundary as the upper limit on the buffer size and applying an adjustment value to the two's power boundary, and storing the exponent of the selected two's power boundary and the adjustment value in the unused bits of the indirect address.

### Claim 24 (depends on 23)

The one or more non-transitory machine readable storage media of claim 23, wherein the instructions result in the computing device encrypting the determined portion of the indirect address with a tweakable block cipher using a secret key and using the exponent of the selected two's power boundary stored in the unused bits of the indirect address as a tweak.

### Claim 25 (depends on 20)

The one or more non-transitory machine readable storage media of claim 20, wherein the instructions result in the computing device, during execution of a computer program, on a memory access operation involving memory and a register, obtaining the encoded indirect address and decrypting the encrypted portion of the encoded address using the secret key and a tweak.
