# US 2025/0156543 A1 · Using approximate membership query filters for efficient control flow integrity protection

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

- Number: US 2025/0156543 A1
- Document ID: US20250156543A1
- Status: Published application
- Kind: A1
- Application number: 18/506,639
- Filed: 2023-11-10
- Published: 2025-05-15
- Earliest claimed: 2023-11-10
- Assignees: NXP B.V.
- Applicants: NXP B.V.
- Inventors: Jan Hoogerbrugge; Marcel Medwed
- Web page: https://patentgrep.com/patent/US20250156543A1

## CPC

- G06F 21/54: by adding security routines or objects to programs
- G06F 21/566: {Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/321: {Program or instruction counter, e.g. incrementing}
- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- G06F 21/52: during program execution, e.g. stack integrity {; Preventing unwanted data erasure; Buffer overflow}
- G06F 2221/034: Test or assess a computer or a system
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method includes fetching, at a program counter value, an instruction of a basic block of code; decoding the instruction; updating a checksum value with a checksum of the instruction; and determining whether a tuple of the program counter value and the checksum value is in an approximate membership query filter (AMQ-filter).

## Claims

### Claim 1

A method, comprising:
fetching, at a program counter value, an instruction of a basic block of code;
decoding the instruction;
updating a checksum value with a checksum of the instruction; and
determining whether a tuple of the program counter value and the checksum value is in an approximate membership query filter (AMQ-filter).

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
setting the program counter value to an exception handler address, if the tuple is not in the AMQ-filter.

### Claim 3 (depends on 2)

The method of claim 2, wherein the determining is performed by transmitting the tuple to the AMQ-filter and receiving a response indicating the tuple is not in the AMQ-filter.

### Claim 4 (depends on 1)

The method of claim 1, wherein the determining is performed, if the instruction is a last instruction of the basic block.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
resetting the checksum value, if the instruction is a first instruction of the basic block.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
resetting an instruction counter, if the instruction is a first instruction of the basic block; and
incrementing the instruction counter, corresponding to the fetching, wherein the determining is performed, if the instruction counter exceeds a predetermined threshold.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
executing the instruction, if the tuple is in the AMQ-filter.

### Claim 8

An apparatus, comprising:
an approximate membership query filter (AMQ-filter) that stores tuples of program counters and checksums; and
a processing core that fetches, at a program counter value, an instruction of a basic block of code, decodes the instruction, and updates a checksum value with a checksum of the instruction, wherein the AMQ-filter is configured to determine whether a tuple of the program counter value and the checksum value is in the AMQ-filter.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein the processing core is configured to set the program counter value to an exception handler address, if the tuple is not in the AMQ-filter.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the processing core is configured to transmit the tuple to the AMQ-filter and to receive a response indicating the tuple is not in the AMQ-filter.

### Claim 11 (depends on 8)

The apparatus of claim 8, wherein the AMQ-filter is configured to determine whether the tuple is in the AMQ-filter, if the instruction is a last instruction of the basic block.

### Claim 12 (depends on 8)

The apparatus of claim 8, wherein the processing core is configured to reset the checksum value, if the instruction is a first instruction of the basic block.

### Claim 13 (depends on 8)

The apparatus of claim 8, wherein the processing core is configured to reset an instruction counter, if the instruction is a first instruction of the basic block, and to increment the instruction counter, corresponding to the processing core fetching the instruction, and the AMQ-filter is configured to determine whether the tuple is in the AMQ-filter, if the instruction counter exceeds a predetermined threshold.

### Claim 14 (depends on 8)

The apparatus of claim 8, wherein the processing core is configured to execute the instruction, if the tuple is in the AMQ-filter.

### Claim 15

An apparatus, comprising:
means for fetching, at a program counter value, an instruction of a basic block of code, for decoding the instruction, and for updating a checksum value with a checksum of the instruction; and
means for determining whether a tuple of the program counter value and the checksum value is valid.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the means for fetching sets the program counter value to an exception handler address, if the tuple is not valid.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the means for fetching transmits the tuple to the means for determining and receives a response indicating the tuple is not valid.

### Claim 18 (depends on 15)

The apparatus of claim 15, wherein the means for determining determines whether the tuple is valid, if the instruction is a last instruction of the basic block.

### Claim 19 (depends on 15)

The apparatus of claim 15, wherein the means for fetching resets the checksum value, if the instruction is a first instruction of the basic block.

### Claim 20 (depends on 15)

The apparatus of claim 15, wherein the means for fetching executes the instruction, if the tuple is valid.
