IP Library Granted Patent US 12,124,562
Granted Patent B2
US 12,124,562 · App. 17/671,464 · Granted Oct 22, 2024

Labeled security for control flow inside executable program code

Inventors: Peter Jones (Cambridge, MA); Adam Jackson (Somerville, MA)
Assignee: Red Hat, Inc.
G06F21/52G06F21/51G06F21/54G06F2221/033
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,124,562
App. No.
17/671,464
Granted
Oct 22, 2024
Kind
B2
Abstract

A method includes configuring one or more permissions for a first page of memory including a first section of a plurality of sections of an executable program code to enable execution of the first section. The method also includes configuring one or more permissions for a second page of the memory including a second section of the executable program code to disable execution of the second section. The method also includes identifying one or more annotations in the executable program code, wherein the one or more annotations indicate one or more allowed transitions and one or more disallowed transitions between the plurality of sections. The method also includes changing, in view of the one or more annotations, the one or more permissions of the second page to enable execution of the second section of the executable program code.

Claims (60)

1. A method comprising:

configuring one or more permissions for a first page of memory including a first section of a plurality of sections of an executable program code to enable execution of the first section of the executable program code;

configuring one or more permissions for a second page of the memory including a second section of the executable program code to disable execution of the second section of the executable program code;

identifying one or more annotations in the executable program code, wherein the one or more annotations indicate one or more allowed transitions and one or more disallowed transitions between the plurality of sections;

determining, in view of the one or more annotations, that a transition from a first label associated with the first section to a second label associated with the second section is not allowed; and

transferring control to a virtual machine operating as a sandbox to execute the executable program code to carry out the transition, wherein the virtual machine is not loaded with the first section of the executable program code, and wherein the virtual machine is loaded with the second section of the executable program code for execution.

2. The method of claim 1 , further comprising:

loading each of the plurality of sections of the executable program code into a respective page of a plurality of pages of the memory, wherein the first section of the executable program code is loaded into the first page, and wherein the second section of the executable program code is loaded into the second page.

3. The method of claim 1 , further comprising:

identifying, using the one or more annotations in the executable program code, one or more sections of the plurality of sections of the executable program code that are allowed to transition to one another; or

identifying, using the one or more annotations, the one or more sections of the plurality of sections of the executable program code that are not allowed to transition to one another.

4. The method of claim 1 , further comprising:

associating a plurality of labels to the plurality of sections of the executable program code, wherein the first section is associated with the first label of the plurality of labels and the second section is associated with the second label of the plurality of labels; and

maintaining a transition table that specifies allowed transitions between the plurality of labels associated with the plurality of sections in view of the one or more annotations.

5. The method of claim 4 , further comprising using the transition table to determine whether the transition from the first section to the second section is allowed during execution of the executable program code.

6. The method of claim 1 , further comprising;

responsive to determining that the transition from the first label associated with the first section to the second label associated with the second section is allowed, changing the one or more permissions of the second page to enable execution of the second section of the executable program code, wherein changing the one or more permissions of the second page to enable execution of the second section of the executable program code comprises:

determining, using the one or more annotations, whether a transition from the first section with enabled execution to the second section with disabled execution is allowed during execution of the executable program code; and

responsive to a determination that the transition from the first section to the second section is allowed during execution of the executable program code, changing the one or more permissions of the second page to enable execution of the second section of the executable program code.

7. The method of claim 1 , further comprising:

receiving a page fault in response to an attempt to execute a transition from the first section to the second section; and

using a transition table to determine whether the transition from the first section to the second section is allowed, wherein the transition table comprises at least one mapping of an allowable transition from the first label associated with the first section to the second label associated with the second section.

8. The method of claim 1 , further comprising, responsive to a determination that a transition from the first section to the second section is not allowed, terminating execution of the executable program code.

9. The method of claim 1 , further comprising, responsive to the determination that the transition from the first section to the second section is not allowed:

suspending execution of the executable program code; and

cloning the executable program code to the virtual machine operating as the sandbox.

10. The method of claim 1 , further comprising:

determining that a transition from the first section to the second section is allowed during execution of the executable program code, wherein the determination is made using a transition table comprising at least one mapping of an allowable transition from the first label associated with the first section to the second label associated with the second section.

11. A non-transitory computer-readable medium comprising instructions that, when executed by a processing device, cause the processing device to:

configure one or more permissions for a first page of memory including a first section of a plurality of sections of an executable program code to enable execution of the first section of the executable program code;

configure one or more permissions for a second page of the memory including a second section of the executable program code to disable execution of the second section of the executable program code;

identify one or more annotations in the executable program code, wherein the one or more annotations indicate one or more allowed transitions and one or more disallowed transitions between the plurality of sections;

determine, in view of the one or more annotations, that a transition from a first label associated with the first section to a second label associated with the second section is not allowed; and

transferring control to a virtual machine operating as a sandbox to execute the executable program code to carry out the transition, wherein the virtual machine is not loaded with the first section of the executable program code, and wherein the virtual machine is loaded with the second section of the executable program code for execution.

12. The non-transitory computer-readable medium of claim 11 , further comprising instructions that, when executed by the processing device, cause the processing device to:

load each of the plurality of sections of the executable program code into a respective page of a plurality of pages of the memory, wherein the first section of the executable program code is loaded into the first page, and wherein the second section of the executable program code is loaded into the second page.

13. The non-transitory computer-readable medium of claim 11 , further comprising instructions that, when executed by the processing device, cause the processing device to:

identify, using the one or more annotations in the executable program code, one or more sections of the plurality of sections of the executable program code that are allowed to transition to one another; or

identify, using the one or more annotations, the one or more sections of the plurality of sections of the executable program code that are not allowed to transition to one another.

14. The non-transitory computer-readable medium of claim 11 , further comprising instructions that, when executed by the processing device, cause the processing device to:

associate a plurality of labels to the plurality of sections of the executable program code, wherein the first section is associated with the first label of the plurality of labels and the second section is associated with the second label of the plurality of labels; and

maintain a transition table that specifies allowed transitions between the plurality of labels associated with the plurality of sections in view of the one or more annotations.

15. The non-transitory computer-readable medium of claim 14 , further comprising instructions that, when executed by the processing device, cause the processing device to use the transition table to determine whether the transition from the first section to the second section is allowed during execution of the executable program code.

16. The non-transitory computer-readable medium of claim 11 , further comprising instructions that, when executed by the processing device, cause the processing device to:

determine, using the one or more annotations, whether a transition from the first section with enabled execution to the second section with disabled execution is allowed during execution of the executable program code; and

responsive to a determination that the transition from the first section to the second section is allowed during execution of the executable program code, change the one or more permissions of the second page to enable execution of the second section of the executable program code.

17. A system comprising:

a memory device storing instructions; and

a processing device coupled to the memory device, wherein the processing device executes the instructions to:

configure one or more permissions for a first page of memory including a first section of a plurality of sections of an executable program code to enable execution of the first section of the executable program code;

configure one or more permissions for a second page of the memory including a second section of the executable program code to disable execution of the second section of the executable program code;

identify one or more annotations in the executable program code, wherein the one or more annotations indicate one or more allowed transitions and one or more disallowed transitions between the plurality of sections;

determine, in view of the one or more annotations, that a transition from a first label associated with the first section to a second label associated with the second section is not allowed; and

transferring control to a virtual machine operating as a sandbox to execute the executable program code to carry out the transition, wherein the virtual machine is not loaded with the first section of the executable program code, and wherein the virtual machine is loaded with the second section of the executable program code for execution code.

18. The system of claim 17 , wherein the processing device is further to:

load each of the plurality of sections of the executable program code into a respective page of a plurality of pages of the memory, wherein the first section of the executable program code is loaded into the first page, and wherein the second section of the executable program code is loaded into the second page.

19. The system of claim 17 , wherein the processing device is further to:

responsive to determining that the transition from the first label associated with the first section to the second label associated with the second section is allowed, changing the one or more permissions of the second page to enable execution of the second section of the executable program code, wherein to change the one or more permissions of the second page to enable execution of the second section of the executable program code, the processing device is further to:

determine, using the one or more annotations, whether a transition from the first section with enabled execution to the second section with disabled execution is allowed during execution of the executable program code; and

responsive to a determination that the transition from the first section to the second section is allowed during execution of the executable program code, change the one or more permissions of the second page to enable execution of the second section of the executable program code.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 15, 2022
From: JONES, PETER; JACKSON, ADAM
To: RED HAT, INC.
Reel/Frame 059012/0005 →