IP Library › Granted Patent US 12,189,759
Granted Patent B2
US 12,189,759 · App. 17/465,694 · Granted Jan 7, 2025

Runtime-tailored security policies for applications

Inventors: Matthias Neugschwandtner (Perchtoldsdorf, AT); Hugo Guiroux (Zurich, CH); Paul Elvinger (Zurich, CH)
Assignee: Oracle International Corporation
G06F21/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,189,759
App. No.
17/465,694
Granted
Jan 7, 2025
Kind
B2
Abstract

Techniques are described herein for function-level limiting of privileges for a target application. Privileges dependencies for different functions of an application are determined based on static evaluation of the code base. A call graph with nodes representing the application functions is established, and the nodes are associated with the determined privilege dependencies. The graph is modified using iterative backward dataflow analysis to associate the nodes in the graph with privileges that are reachable from each node. Transition-edges are identified within the graph, where a transition-edge connects nodes having different sets of privileges. Function calls implementing the identified transition-edges are replaced, in instructions for the application (e.g., bytecode or machine code), with calls to wrapper functions. Each wrapper function transfers control to a thread other than the caller thread, to which a security policy for the replaced function is applied, and uses the other thread to execute the replaced function.

Claims (77)

1. A computer-implemented method comprising:

identifying a plurality of function sets, among a plurality of functions of a particular application, one or more functions of each function set being associated with a common set of privilege dependencies including privileges granted for the one or more functions;

identifying one or more transition function calls in instructions for the particular application;

wherein a transition function call invokes a target function of a first function set, of the plurality of function sets, from within a caller function of a second function set of the plurality of function sets, the target function being associated with at least one granted privilege of the common set of privilege dependencies;

modifying the instructions for the particular application, to produce modified instructions, by replacing each transition function call, of the one or more transition function calls, with a wrapper function call that, when executed, causes a target function of said each transition function call to be executed by a separate thread with one or more privileges represented by a thread set of privilege dependencies associated with a function set that includes the target function, the thread set of privilege dependencies based on the at least one granted privilege; and

storing the modified instructions in memory or on disk;

wherein the method is performed by one or more computing devices.

2. The computer-implemented method of claim 1 , wherein:

said identifying the plurality of function sets is based, at least in part, on a fixed-point call graph comprising (a) a plurality of nodes representing the plurality of functions, and (b) one or more edges representing respective one or more function calls between the plurality of functions in the particular application;

wherein each node, of one or more nodes of the fixed-point call graph, is associated with a set of privilege dependencies that comprises any privilege dependencies for a function represented by said each node and any privilege dependencies for functions represented by any nodes that are reachable from said each node via edges of the fixed-point call graph;

wherein the one or more functions of each function set, of the plurality of function sets, are represented by one or more contiguous nodes in the fixed-point call graph.

3. The computer-implemented method of claim 2 , further comprising, prior to said identifying the plurality of function sets of the particular application:

performing iterative backward dataflow analysis on a preliminary call graph that comprises the plurality of nodes and the one or more edges;

wherein each node, of one or more nodes of the preliminary call graph, is associated with a preliminary set of privilege dependencies that comprises the any privilege dependencies for a function represented by said each node; and

generating the fixed-point call graph by associating each node, of one or more nodes in the preliminary call graph, with an associated set of privilege dependencies identified via the iterative backward dataflow analysis.

4. The computer-implemented method of claim 3 , further comprising:

prior to said identifying the plurality of function sets of the particular application:

identifying one or more transition edges of the fixed-point call graph;

wherein each transition edge, of the one or more transition edges, connects nodes associated with different sets of privileges;

wherein at least one function set, of the plurality of function sets, comprises multiple functions; and

wherein functions of any function set, of the plurality of function sets, comprising the multiple functions are connected by non-transition edges in the fixed-point call graph.

5. The computer-implemented method of claim 1 , further comprising:

executing the modified instructions to cause a first thread executing a first function that includes a particular wrapper function call, which replaced a particular transition function call to a particular function, to execute a particular wrapper function called by the particular wrapper function call, where the particular wrapper function call is one of the wrapper function call that replaced one of the each transition function call;

wherein the particular wrapper function shifts control to a second thread for execution of the particular function;

wherein the second thread is associated with a different set of privileges than the first thread.

6. The computer-implemented method of claim 5 , wherein prior to shifting control to the second thread, the particular wrapper function spawns the second thread and associates the second thread with the different set of privileges.

7. The computer-implemented method of claim 5 , wherein the second thread is initialized prior to executing the particular wrapper function.

8. The computer-implemented method of claim 7 , wherein the second thread is selected to run the particular function based on the second thread being associated with a set of privileges identified by a set of privilege dependencies associated with the particular function.

9. The computer-implemented method of claim 7 , wherein:

the second thread is selected to run the particular function based on the second thread being associated with a superset of a set of privileges identified by a set of privilege dependencies associated with the particular function;

the superset comprises one or more privileges not identified by the set of privilege dependencies associated with the particular function; and

the method further comprises, prior to the second thread executing the particular function, disassociating the second thread from the one or more privileges.

10. The computer-implemented method of claim 1 , further comprising:

receiving a request to modify the instructions for the particular application;

wherein said modifying the instructions is performed in response to receiving the request; and

returning the modified instructions as a response to the request.

11. The computer-implemented method of claim 1 , wherein:

each of one or more function sets, of the plurality of function sets, includes at least one function of a corresponding function set that is associated with one or more different privilege dependencies than other functions in said corresponding function set;

the common set of privilege dependencies for each function set, of the one or more function sets, comprises a superset of privilege dependencies for the functions of said each function set.

12. One or more non-transitory computer-readable media storing one or more sequences of instructions that, when executed by one or more processors, cause:

identifying a plurality of function sets, among a plurality of functions of a particular application, one or more functions of each function set being associated with a common set of privilege dependencies including privileges granted for the one or more functions;

identifying one or more transition function calls in instructions for the particular application;

wherein a transition function call invokes a target function of a first function set, of the plurality of function sets, from within a caller function of a second function set of the plurality of function sets, the target function being associated with at least one granted privilege of the common set of privilege dependencies;

modifying the instructions for the particular application, to produce modified instructions, by replacing each transition function call, of the one or more transition function calls, with a wrapper function call that, when executed, causes a target function of said each transition function call to be executed by a separate thread with one or more privileges represented by a thread set of privilege dependencies associated with a function set that includes the target function, the thread set of privilege dependencies based on the at least one granted privilege; and

storing the modified instructions in memory or on disk.

13. The one or more non-transitory computer-readable media of claim 12 , wherein:

said identifying the plurality of function sets is based, at least in part, on a fixed-point call graph comprising (a) a plurality of nodes representing the plurality of functions, and (b) one or more edges representing respective one or more function calls between the plurality of functions in the particular application;

wherein each node, of one or more nodes of the fixed-point call graph, is associated with a set of privilege dependencies that comprises any privilege dependencies for a function represented by said each node and any privilege dependencies for functions represented by any nodes that are reachable from said each node via edges of the fixed-point call graph;

wherein the one or more functions of each function set, of the plurality of function sets, are represented by one or more contiguous nodes in the fixed-point call graph.

14. The one or more non-transitory computer-readable media of claim 13 , wherein the one or more sequences of instructions, when executed by one or more processors, cause, prior to said identifying the plurality of function sets of the particular application:

performing iterative backward dataflow analysis on a preliminary call graph that comprises the plurality of nodes and the one or more edges;

wherein each node, of one or more nodes of the preliminary call graph, is associated with a preliminary set of privilege dependencies that comprises the any privilege dependencies for a function represented by said each node; and

generating the fixed-point call graph by associating each node, of one or more nodes in the preliminary call graph, with an associated set of privilege dependencies identified via the iterative backward dataflow analysis.

15. The one or more non-transitory computer-readable media of claim 14 , wherein the one or more sequences of instructions, when executed by one or more processors, cause:

prior to said identifying the plurality of function sets of the particular application:

identifying one or more transition edges of the fixed-point call graph;

wherein each transition edge, of the one or more transition edges, connects nodes associated with different sets of privileges;

wherein at least one function set, of the plurality of function sets, comprises multiple functions; and

wherein functions of any function set, of the plurality of function sets, comprising the multiple functions are connected by non-transition edges in the fixed-point call graph.

16. The one or more non-transitory computer-readable media of claim 12 , wherein the one or more sequences of instructions, when executed by one or more processors, cause:

executing the modified instructions to cause a first thread executing a first function that includes a particular wrapper function call, which replaced a particular transition function call to a particular function, to execute a particular wrapper function called by the particular wrapper function call, where the particular wrapper function call is one of the wrapper function call that replaced one of the each transition function call;

wherein the particular wrapper function shifts control to a second thread for execution of the particular function;

wherein the second thread is associated with a different set of privileges than the first thread.

17. The one or more non-transitory computer-readable media of claim 16 , wherein prior to shifting control to the second thread, the particular wrapper function spawns the second thread and associates the second thread with the different set of privileges.

18. The one or more non-transitory computer-readable media of claim 16 , wherein the second thread is initialized prior to executing the particular wrapper function.

19. The one or more non-transitory computer-readable media of claim 18 , wherein the second thread is selected to run the particular function based on the second thread being associated with a set of privileges identified by a set of privilege dependencies associated with the particular function.

20. The one or more non-transitory computer-readable media of claim 18 , wherein:

the second thread is selected to run the particular function based on the second thread being associated with a superset of a set of privileges identified by a set of privilege dependencies associated with the particular function;

the superset comprises one or more privileges not identified by the set of privilege dependencies associated with the particular function; and

the one or more sequences of instructions further comprise instructions that, when executed by one or more processors, cause, prior to the second thread executing the particular function, disassociating the second thread from the one or more privileges.

21. The one or more non-transitory computer-readable media of claim 12 , wherein the one or more sequences of instructions, when executed by one or more processors, cause:

receiving a request to modify the instructions for the particular application;

wherein said modifying the instructions is performed in response to receiving the request; and

returning the modified instructions as a response to the request.

22. The one or more non-transitory computer-readable media of claim 12 , wherein:

each of one or more function sets, of the plurality of function sets, includes at least one function of a corresponding function set that is associated with one or more different privilege dependencies than other functions in said corresponding function set;

the common set of privilege dependencies for each function set, of the one or more function sets, comprises a superset of privilege dependencies for the functions of said each function set.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 2, 2021
From: NEUGSCHWANDTNER, MATTHIAS; GUIROUX, HUGO; ELVINGER, PAUL
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 057377/0059 →
Continuity (1)
Related Publication 20230074580A1 · Mar 9, 2023
References Cited (65)
US 7076804B2 · Kershenbaum · 2006 [cited by examiner]
US 7150008B2 · Cwalina et al. · 2006 [cited by applicant]
US 7437718B2 · Fournet et al. · 2008 [cited by applicant]
US 7526758B2 · Hasse et al. · 2009 [cited by applicant]
US 7617489B2 · Peyton et al. · 2009 [cited by applicant]
US 8230477B2 · Centonze · 2012 [cited by applicant]
US 8881288B1 · Levy et al. · 2014 [cited by applicant]
US 9256739B1 · Roundy et al. · 2016 [cited by applicant]
US 9519696B1 · Roth et al. · 2016 [cited by applicant]
US 9600666B1 · Harter · 2017 [cited by examiner]
US 9697018B2 · Brutschy · 2017 [cited by examiner]
US 9946879B1 · Sharifi Mehr · 2018 [cited by examiner]
US 9965618B1 · Sharifi Mehr · 2018 [cited by examiner]
US 10019572B1 · Sharifi Mehr · 2018 [cited by examiner]
US 10032031B1 · Sharifi Mehr · 2018 [cited by examiner]
US 10409995B1 · Wasiq et al. · 2019 [cited by applicant]
US 10609041B1 · Wilczynski et al. · 2020 [cited by applicant]
US 10614218B2 · Peyton, Jr. et al. · 2020 [cited by applicant]
US 10812497B2 · Venkatramani et al. · 2020 [cited by applicant]
US 20020169986A1 · Lortz · 2002 [cited by examiner]
US 20020184486A1 · Kershenbaum · 2002 [cited by examiner]
US 20040040017A1 · Kershenbaum · 2004 [cited by examiner]
US 20050039158A1 · Koved · 2005 [cited by examiner]
US 20050055565A1 · Fournet et al. · 2005 [cited by applicant]
US 20050172126A1 · Lange et al. · 2005 [cited by applicant]
US 20070016773A1 · Perlman · 2007 [cited by examiner]
US 20070282841A1 · Sreedhar · 2007 [cited by examiner]
US 20080201693A1 · Centonze · 2008 [cited by examiner]
US 20080201760A1 · Centonze · 2008 [cited by examiner]
US 20080306958A1 · Sreedhar · 2008 [cited by examiner]
US 20100100774A1 · Ding et al. · 2010 [cited by applicant]
US 20100169888A1 · Hare · 2010 [cited by examiner]
US 20110258617A1 · Park et al. · 2011 [cited by applicant]
US 20120284792A1 · Liem · 2012 [cited by applicant]
US 20130067532A1 · Deakin · 2013 [cited by examiner]
US 20130067592A1 · Sreedhar · 2013 [cited by examiner]
US 20130091487A1 · Chandra et al. · 2013 [cited by applicant]
US 20130333025A1 · Sreedhar · 2013 [cited by examiner]
US 20140196104A1 · Chari · 2014 [cited by examiner]
US 20140344924A1 · McLachlan et al. · 2014 [cited by applicant]
US 20150161384A1 · Gu et al. · 2015 [cited by applicant]
US 20150268941A1 · Nakaike et al. · 2015 [cited by applicant]
US 20160182558A1 · Tripp · 2016 [cited by applicant]
US 20170255544A1 · Plate et al. · 2017 [cited by applicant]
US 20170337123A1 · Wang · 2017 [cited by applicant]
US 20180046810A1 · Ferrara · 2018 [cited by examiner]
US 20180089439A1 · Hay · 2018 [cited by examiner]
US 20180137279A1 · Peyton, Jr. et al. · 2018 [cited by applicant]
US 20180330097A1 · Dietsch et al. · 2018 [cited by applicant]
US 20190102279A1 · Awan · 2019 [cited by examiner]
US 20190156028A1 · Hay · 2019 [cited by examiner]
US 20200026851A1 · Dhankha et al. · 2020 [cited by applicant]
US 20200167155A1 · Lu et al. · 2020 [cited by applicant]
US 20200210161A1 · Portela Parente et al. · 2020 [cited by applicant]
US 20200404007A1 · Singh et al. · 2020 [cited by applicant]
US 20210073107A1 · Sharma · 2021 [cited by applicant]
US 20210157924A1 · Antoniadis et al. · 2021 [cited by applicant]
US 20210281597A1 · Guiroux · 2021 [cited by applicant]
US 20220413902A1 · Olszewski · 2022 [cited by examiner]
Guiroux, U.S. Appl. No. 16/809,928, filed Mar. 5, 2020, Notice of Allowance and Fees Due, Feb. 2, 2022. [cited by applicant]
Guiroux, U.S. Appl. No. 16/809,928, filed Mar. 5, 2020, Non-Final Rejection, Dec. 29, 2021. [cited by applicant]
Wu et al., “Automatically Partition Software into Least Privilege Components using Dynamic Data Dependency Analysis”, IEEE, dated 2013, 11 pages. [cited by applicant]
Oracle Ksplice, Ksplice—Reboots are a thing of the past!, https://ksplice.oracle.com, printed Jul. 30, 2021, 2pgs. [cited by applicant]
Ghavamnia, Seyedhamed, et al., “Temporal System Call Specialization for Attack Surface Reduction”, 29th USENIX Security Symp, https://www.usenix.org/conference/usenixsecurity20/presentation/ghavamnia, pp. 1749-1766, Aug… [cited by applicant]
ASM, https://asm.ow2.io, printed Jul. 30, 2021, 1pg. [cited by applicant]