IP Library Granted Patent US 8,528,083
Granted Patent B2
US 8,528,083 · App. 13/045,339 · Granted Sep 3, 2013

Using a call gate to prevent secure sandbox leakage

Inventor: Paton Lewis (Seattle, WA)
Assignee: Adobe Systems Incorporated
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 8,528,083
App. No.
13/045,339
Granted
Sep 3, 2013
Kind
B2
Abstract

Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for enveloping a thread of execution within an IDT-based secure sandbox. In one aspect, embodiments of the invention provide that a request is received from an application, the request being generated using an application programming interface of a device driver. After the request is received a call gate descriptor for a call gate is added to a segment descriptor table for the application. The call gate descriptor specifies: (a) that the call gate can be called from a first privilege level of the application; and (b) that the call gate requests a second privilege level higher that the first privilege level. A call gate selector for the call gate descriptor is provided to the application in response to the request.

Claims (84)

1. A method performed by a computing system, the method comprising:

receiving a request from an application to enable a secure sandbox;

responsive to receiving the request, adding a call gate descriptor for a call gate to a segment descriptor table for the application, the call gate descriptor configured to specify:

a first privilege level of the application, the first privilege level associated with the call gate; and

a second privilege level requested by the call gate, the second privilege level being relatively higher than the first privilege level;

providing a call gate selector for the call gate descriptor to the application in response to the request;

receiving a far call from the application, the far call having a segment selector that references the call gate descriptor; and

responsive to receiving the far call:

transitioning into the second privilege level;

switching into the call gate target code based on the segment selector;

enabling selective redirection by at least executing the call gate target code; and

returning control to the application responsive to the selective redirection being enabled.

2. The method of claim 1 , further comprising:

storing, before adding the call gate descriptor and using one common virtual address, a call gate target code in a virtual memory map of the application and in a virtual memory map of a kernel, the call gate target code configured to provide selective redirection of calls from the application, wherein the call gate descriptor further specifies the common virtual address as a target address for the call gate.

3. The method of claim 1 , further comprising:

executing, by the call gate target code, an interrupt disable instruction when switching into the call gate target code;

receiving, after the far call from the application and before executing the interrupt disable instruction, an interrupt;

processing the interrupt;

restoring, by the call gate target code, a value for a control register, the value indicating a physical address for the virtual memory map of the application;

modifying, by the call gate target code, one or more entries in a stack;

enabling the secure sandbox; and

returning control to the application upon the enabling of the secure sandbox.

4. The method of claim 1 , wherein the first privilege level is at ring 3, the second privilege level is at ring 0, and executing the call gate target code enables the secure sandbox.

5. The method of claim 1 , wherein the far call further comprises an offset set equal to zero.

6. A computer storage device encoded with a computer program, the program comprising instructions that when executed by data processing apparatus cause the data processing apparatus to perform operations comprising:

receiving a request from an application to enable a secure sandbox;

responsive to receiving the request, adding a call gate descriptor for a call gate to a segment descriptor table for the application, the call gate descriptor a first privilege level of the application and a second privilege level requested by the call gate, the first privilege level associated with the call gate, the second privilege level being relatively higher than the first privilege level;

providing a call gate selector for the call gate descriptor to the application in response to the request;

receiving a far call from the application, the far call having a segment selector that references the call gate descriptor; and

in response to the far call:

transitioning into the second privilege level;

switching into the call gate target code based on the segment selector;

executing the call gate target code to enable a selective redirection; and

returning control to the application upon the enabling of the selective redirection.

7. The computer storage device of claim 6 , wherein the operations further comprise:

storing, before adding the call gate descriptor and using one common virtual address, a call gate target code in a virtual memory map of the application and in a virtual memory map of a kernel, the call gate target code configured to provide selective redirection of calls from the application, wherein the call gate descriptor further specifies the common virtual address as a target address for the call gate.

8. The computer storage device of claim 6 , wherein the operations further comprise:

executing, by the call gate target code, an interrupt disable instruction when switching into the call gate target code;

receiving, after the far call from the application and before executing the interrupt disable instruction, an interrupt;

processing the interrupt;

restoring, by the call gate target code, a value for a control register, the value indicating a physical address for the virtual memory map of the application;

modifying, by the call gate target code, one or more entries in a stack;

enabling the secure sandbox; and

returning control to the application upon the enabling of the secure sandbox.

9. The computer storage device of claim 6 , wherein the first privilege level is at ring 3, the second privilege level is at ring 0, and executing the call gate target code enables the secure sandbox.

10. The computer storage device of claim 6 , wherein the far call further comprises an offset set equal to zero.

11. A system comprising:

a processor; and

a computer readable storage device coupled to the processor and having stored therein an application, a device driver, and an operating system kernel,

the computer readable storage device further having instructions that, responsive to execution by the processor, cause the processor to:

receive a request from an application to enable a secure sandbox;

responsive to the request being received, add a call gate descriptor for a call gate to a segment descriptor table for the application, the call gate descriptor configured to specify a first privilege level of the application and a second privilege level requested by the call gate, the second privilege level being relatively higher than the first privilege level;

provide a call gate selector for the call gate descriptor to the application in response to the request;

receive a far call from the application, the far call having a segment selector that comprises the call gate descriptor; and

responsive to the far call being received:

transition into the second privilege level;

switch into the call gate target code based on the segment selector;

execute the call gate target code to enable a selective redirection; and

return control to the application upon the enabling of the selective redirection.

12. The system of claim 11 , wherein the instructions, responsive to execution, further cause the processor to:

store, prior to the call gate descriptor being added and using one common virtual address, a call gate target code in a virtual memory map of the application and in a virtual memory map of a kernel, the call gate target code configured to provide selective redirection of calls from the application, wherein the call gate descriptor further specifies the common virtual address as a target address for the call gate.

13. The system of claim 11 , the computer readable storage device having further stored therein a stack, and wherein the instructions, responsive to execution, further cause the processor to:

execute, by the call gate target code, an interrupt disable instruction when switching into the call gate target code;

receive, after the far call from the application and before executing the interrupt disable instruction, an interrupt;

process the interrupt;

restore, by the call gate target code, a value for a control register, the value indicating a physical address for the virtual memory map of the application;

modify, by the call gate target code, one or more entries in the stack;

enable a secure sandbox; and

return control to the application upon the enabling of the secure sandbox.

14. The system of claim 11 , wherein the first privilege level is at ring 3, the second privilege level is at ring 0, and executing the call gate target code enables a secure sandbox.

15. The system of claim 11 , wherein the far call further comprises an offset set equal to zero.

16. The system of claim 11 , wherein the secure sandbox is configured to prevent execution of a thread from transferring control directly to the operating system kernel.

17. The system of claim 11 , wherein the device driver is configured to:

access a permissions table to identify one or more interrupt values or one or more system call values associated with a trapped call; and

determine that the trapped call with an associated interrupt value or system call value that is not included in the permissions table comprises a call that is to be executed within the secure sandbox.

18. The system of claim 11 , wherein the instructions, responsive to execution by the processor, further cause the processor to enable the sandbox thread without using the operating system kernel.

19. The system of claim 11 , wherein the instructions, responsive to execution by the processor, further cause the processor to:

access a permissions table to identify one or more interrupt values or one or more system call values associated with a trapped call;

determine that the trapped call comprises an interrupt that is flagged for execution outside of the secure sandbox based on an associated interrupt value that is included in the permissions table.

20. The system of claim 18 , wherein the instructions, responsive to execution by the processor, further cause the processor to:

identify and trap a new call;

access a permissions table to identify one or more interrupt values or one or more system call values associated with the trapped call;

determine that the trapped call comprises an interrupt instruction or an operating system instruction that mandates shutdown of the secure sandbox; and

call the operating system kernel to terminate the secure sandbox.

Assignments (2)
CHANGE OF NAME Recorded Apr 8, 2019
From: ADOBE SYSTEMS INCORPORATED
To: ADOBE INC.
Reel/Frame 048867/0882 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 15, 2011
From: LEWIS, PATON
To: ADOBE SYSTEMS INCORPORATED
Reel/Frame 025959/0230 →
Continuity (1)
Related Publication 20130167222A1 · Jun 27, 2013