# US 11,119,769 B2 · Enhanced protection of processors from a buffer overflow attack

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

- Number: US 11,119,769 B2
- Document ID: US11119769B2
- Status: Granted
- Kind: B2
- Application number: 16/792,432
- Filed: 2020-02-17
- Published: 2020-06-11
- Granted: 2021-09-14
- Earliest claimed: 2015-12-03
- Applicants: Forrest L. Pierson
- Inventors: Forrest L. Pierson
- Web page: https://patentgrep.com/patent/US11119769B2

## CPC

- G06F 9/30058: {Conditional branch instructions}
- G06F 9/3001: {Arithmetic instructions}
- G06F 9/30156: {Special purpose encoding of instructions, e.g. Gray coding}
- G06F 9/3016: {Decoding the operand specifier, e.g. specifier format}
- G06F 9/30178: {of compressed or encrypted instructions}
- G06F 9/30185: {according to one or more bits in the instruction, e.g. prefix, sub-opcode}
- G06F 9/34: Addressing or accessing the instruction operand or the result {; Formation of operand address; Addressing modes (address translation G06F12/00)}
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 21/52: during program execution, e.g. stack integrity {; Preventing unwanted data erasure; Buffer overflow}
- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- G06F 2212/1052: Security improvement
- G06F 2212/452: Instruction code
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for changing a processor instruction randomly, covertly, and uniquely, so that the reverse process can restore it faithfully to its original form, making it virtually impossible for a malicious user to know how the bits are changed, preventing them from using a buffer overflow attack to write code with the same processor instruction changes into said processor's memory with the goal of taking control of the processor. When the changes are reversed prior to the instruction being executed, reverting the instruction back to its original value, malicious code placed in memory will be randomly altered so that when it is executed by the processor it produces chaotic, random behavior that will not allow control of the processor to be compromised, eventually producing a processing error that will cause the processor to either shut down the software process where the code exists to reload, or reset.

## Claims

### Claim 1

A processor comprising:
an instruction register; and
selection circuitry comprising a hardware latch operable to thwart a buffer overflow attack, wherein:
the selection circuitry is electrically coupled with the instruction register; and
the selection circuitry is configured for:
providing decrypted instructions to the instruction register when the hardware latch is in a first state; and
providing un-decrypted instructions to the instruction register when the hardware latch is in a second state.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the hardware latch is set to the first state upon receiving a decrypt command.

### Claim 3 (depends on 2)

The processor of claim 2, wherein the hardware latch is set to the second state upon the processor exiting a reset.

### Claim 4 (depends on 1)

The processor of claim 1, wherein selection circuitry further comprises a multiplexor having a first input for receiving decrypted instructions, a second input for receiving un-decrypted instructions, and an output electrically coupled with the instruction register.

### Claim 5 (depends on 1)

The processor of claim 1 further comprising a memory interface and the memory interface is configured for coupling to one or more memories, wherein the one or more memories are configured to store boot code instructions, unencrypted instructions, and encrypted instructions.

### Claim 6 (depends on 5)

The processor of claim 5, wherein un-decrypted instructions include at least one of the boot code instructions and the unencrypted instructions.

### Claim 7 (depends on 5)

The processor of claim 5, wherein the selection circuitry is further configured to receive the un-decrypted instructions from the memory interface.

### Claim 8 (depends on 7)

The processor of claim 7 further comprising encryption/decryption circuitry, wherein:
the encryption/decryption circuitry is electrically coupled between the memory interface and the selection circuitry; and
the encryption/decryption circuitry is configured for:
receiving the encrypted instructions from the memory interface; and
decrypting the encrypted instructions to provide the decrypted instructions to the selection circuitry.

### Claim 9 (depends on 8)

The processor of claim 8, wherein the encryption/decryption circuitry is further configured for:
receiving the unencrypted instructions from the memory interface; and
encrypting the unencrypted instructions to provide the encrypted instructions to the one or more memories via the memory interface.

### Claim 10 (depends on 9)

The processor of claim 9, wherein encrypting the unencrypted instructions is based on a seed value and a built-in algorithm.

### Claim 11

A method implemented on a processor comprising an instruction register and selection circuitry comprising a hardware latch, the method comprising:
providing decrypted instructions to the instruction register from the selection circuitry when the hardware latch is in a first state; and
providing un-decrypted instructions to the instruction register from the selection circuitry when the hardware latch is in a second state, wherein the hardware latch is operable to thwart a buffer overflow attack on the processor.

### Claim 12 (depends on 11)

The method of claim 11, wherein the hardware latch is set to the first state upon receiving a decrypt command.

### Claim 13 (depends on 12)

The method of claim 12, wherein the hardware latch is set to the second state upon the processor exiting a reset.

### Claim 14 (depends on 11)

The method of claim 11, wherein selection circuitry further comprises a multiplexor having a first input for receiving decrypted instructions, a second input for receiving un-decrypted instructions, and an output electrically coupled with the instruction register.

### Claim 15 (depends on 11)

The method of claim 11, wherein the processor further comprises a memory interface and the memory interface is configured for coupling to one or more memories, wherein the one or more memories are configured to store boot code instructions, unencrypted instructions, and encrypted instructions.

### Claim 16 (depends on 15)

The method of claim 15, wherein un-decrypted instructions include at least one of the boot code instructions and the unencrypted instructions.

### Claim 17 (depends on 15)

The method of claim 15, wherein the selection circuitry is further configured to receive the un-decrypted instructions from the memory interface.

### Claim 18 (depends on 17)

The method of claim 17, wherein the processor further comprises encryption/decryption circuitry, wherein:
the encryption/decryption circuitry is electrically coupled between the memory interface and the selection circuitry; and
the encryption/decryption circuitry is configured for:
receiving the encrypted instructions from the memory interface;
decrypting the encrypted instructions to provide the decrypted instructions to the selection circuitry;
receiving the unencrypted instructions from the memory interface; and
encrypting the unencrypted instructions to provide the encrypted instructions to the one or more memories via the memory interface.
