The present disclosure generally relates to the field of computing. More particularly, an embodiment of the invention generally relates to low overhead paged memory runtime protection.
Virtual machines generally provide a mechanism for emulating a computer architecture and functions of a real world computer. A Virtual Machine Monitor (VMM) refers to a software, firmware, or hardware that creates and runs virtual machines A VMM can use an Extended Page Table (EPT) to partition/isolate software within the same virtual address space into separate physical memory views such that the same linear address mapping has differing permissions in separate permission views. This isolation can be used to protect software from malware attacks by separating untrusted software components from trusted software components into different partitions.
Some techniques for using EPT may monitor the guest physical memory and require that the guest OS (Operating System) mapping in the guest page table does not change (i.e., the memory stays non-pageable or pinned in the OS page tables). While software elements may be made non-pageable in the OS address space, making virtual memory non-pageable is not a scalable solution, e.g., for monitoring the memory of a program that the OS may aim to page out to reduce physical memory pressure.
The detailed description is provided with reference to the accompanying figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The use of the same reference numbers in different figures indicates similar or identical items.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of various embodiments. However, various embodiments of the invention may be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to obscure the particular embodiments of the invention. Further, various aspects of embodiments of the invention may be performed using various means, such as integrated semiconductor circuits (“hardware”), computer-readable instructions organized into one or more programs (“software”), or some combination of hardware and software. For the purposes of this disclosure reference to “logic” shall mean either hardware, software, firmware, or some combination thereof.
As discussed above, an EPT may be used to monitor the guest physical memory and requires that the guest OS (Operating System) mapping in the guest page table does not change (i.e., the memory stays non-pageable or pinned in the OS page tables). In this way, software elements can be made non-pageable in the OS address space; however, in general, making virtual memory non-pageable is not a scalable solution to monitor memory of a program that the OS may aim to page out to reduce physical memory pressure.
To this end, some embodiments allow for secure monitoring of memory for pageable elements of a program, without restricting the paging operations of the OS. In one embodiment, paged memory receives the appropriate permissions for the guest physical mappings (e.g., via EPT) before the paged memory is utilized by the OS (or components loaded by the OS). This may in turn ensure that malware cannot use pageable memory pages to attack the OS. Moreover, some embodiments can be used to protect, monitor, and/or harden OS kernels and runtime programs. Such techniques may also be used for OS hardening, OS security, OS immutability, security software, anti malware software, etc.
In an embodiment, the VMM logic 106 isolates the protected agents' code and data memory pages by creating EPT structures that restrict access to the identified pages in untrusted views (EPT1) (e.g., via read only mappings) and allows access in trusted views (EPT2) (e.g., via read-execute, read-write, or execute-only mappings).
As execution crosses view boundaries, the hardware generates EPT violations that the VMM may check and allow the view transitions (the VMM allows by updating the EPTP to EPT1 or EPT2 for the example shown). Alternately, the VMM may configure the agent to use VMFUNC instruction leaf 0 (in accordance with at least one instruction set architecture) to perform low latency view switches (e.g., requesting the CPU to update EPTP to EPT1 or EPT2 as per the example). Moreover, a low-latency approach may be defined to handle exits and (re)entries from trusted views using a Virtual IDT (vIDT). The vIDT may have two components that are used in some embodiments: (1) Page Fault handler 108 (also called PF exit stub since PF events may cause “exits” from the protected view to allow the OS to handle the PF event); and/or (2) Re-entry stub 114 that may be used to re-enter the protected view (e.g., at the location at which the agent code was interrupted). In an embodiment, critical code and data sections of the IB agent (where “IB” agent generally refers to an entity that enforces security policy on the system, e.g., noted as Protected Agent in
Referring to
In an embodiment, the page out scenario is detected via a W (Write) or X (Execute) violation on a protected code or data page in the default view. This may be done when the page is re-assigned by the OS to another driver or process or put back into the zero page pool.
Referring to
At operation 306, if the fault GPA is determined to be to be a protected GPA, it is determined whether the fault GVA is an expected GVA at an operation 312. If it is, the page is mapped and the source of RIP GVA is matched to allowed accessor ranges at an operation 314. At operation 316, it is determined whether to allow access. If not allowed, operation 318 switches view to agent and decoding is performed to skip data access or code access and the OS resumes at operation 320. If access is allowed at operation 316, operation 322 switches view to single step view or function exiting view to allow access, followed by operation 320.
At operation 312, if the fault GVA and expected GVA do not match, operation 324 walks the global GPT or process GPT using expected GVA to obtain a test GPA. At an operation 326, it is determined whether the GPT walk of operation 324 was successful. If unsuccessful, the expected GVA page is swapped out by the OS at operation 328 and data bases is updated for fault GPA (e.g., disassociating GVA) at an operation 330. At an operation 332, a VM call is made for protected view, to update permission for fault GPA page from RX/RW to default permissions for view (e.g., RO) and for default view set permissions to RWX.
At operation 326, if the GPT walk is successful, the test GPA is checked against the fault GPA and if they match, the page is mapped in at an operation 336 (e.g., indicating that the W/X violation on GPA occurred from alias fault GVA) and method 300 resumes at operation 316. Otherwise, the expected GVA is mapped to different page view at an operation 338 (e.g., indicating that the database is out of synchronization). At an operation 340, expected GVA for the test GPA is updated in the database. At an operation 342, it is determined whether the fault GVA is in a protected GVA range. If so, a VM call is made at operation 344 to release the fault GVA as RWX; otherwise, a VM call is made at operation 346 to update permissions of the fault GPA and the expected GVA for fault GPA is updated to fault GVA.
Generally, hierarchical protection domains also called protection rings provide a mechanism to protect data and functionality from faults and/or malicious behavior. For example, a ring 0 corresponds to a level with the most privileges (e.g., directly interacting with physical hardware such as a processor or memory) and ring 3 refers to a user level (e.g., which is prevented from performing certain functions without informing the user first), etc.
Referring to
As discussed above, at operation 414, the return stub is invoked. To this end, method 400 continues with operation 450 after operation 414 to invoke the return stub with invoke OS parameter(s). An operation 452 checks PF walk of GPT for cached fault GVA. At operation 454, it is determined whether CR2_VGA is present and if not operation 456 signals an error condition via a VM call. If the CR2_GVA is present, GPA is made RW/RX in protected view and RO in all other views at an operation 458. Subsequently, execution of the protected interrupted program is resumed at an operation 460.
Furthermore, some approaches for solving the problems addressed by this disclosure may require performance expensive approaches such as shadowing page tables for each page table created by the OS (which may cause over 30% system overhead). By contrast, some embodiments are expected to only cost less than 5% of system overhead.
Accordingly, some embodiments handle paging of protected memory without compromising performance or security. In an embodiment, paging of protected memory is detected before it is accessed by the protected software to allow the protected memory to be scrubbed. Also, the new OS-assigned memory may be (verified and) protected from untrusted software before the protected software code utilizes it (thus preserving the trust boundary). More particularly, an (e.g., protected) PF handler detects and handles/processes page out and page in affecting protected memory pages in an embodiment. And, the VMM that handles VM calls may assign pages that are paged out with RWX permissions and pages that are paged in with restrictive permissions (e.g., for the untrusted views and RW/RX permissions for the trusted view).
More particularly, the computing system 500 may include one or more central processing unit(s) (CPUs) 502 or processors that communicate via an interconnection network (or bus) 504. Hence, various operations discussed herein may be performed by a CPU in some embodiments. Moreover, the processors 502 may include a general purpose processor, a network processor (that processes data communicated over a computer network 503, or other types of a processor (including a reduced instruction set computer (RISC) processor or a complex instruction set computer (CISC)). Moreover, the processors 502 may have a single or multiple core design. The processors 502 with a multiple core design may integrate different types of processor cores on the same integrated circuit (IC) die. Also, the processors 502 with a multiple core design may be implemented as symmetrical or asymmetrical multiprocessors. Moreover, the operations discussed with reference to
A chipset 506 may also communicate with the interconnection network 504. The chipset 506 may include a graphics and memory control hub (GMCH) 508. The GMCH 508 may include a memory controller 510 that communicates with a memory 512. The memory 512 may store data, including sequences of instructions that are executed by the CPU 502, or any other device included in the computing system 500. In an embodiment, the memory 512 may be the same or similar to the main memory 412 of
The GMCH 508 may also include a graphics interface 514 that communicates with a display 516. In one embodiment of the invention, the graphics interface 514 may communicate with the display 516 via an accelerated graphics port (AGP). In an embodiment of the invention, the display 516 may be a flat panel display that communicates with the graphics interface 514 through, for example, a signal converter that translates a digital representation of an image stored in a storage device such as video memory or system memory into display signals that are interpreted and displayed by the display 516. The display signals produced by the interface 514 may pass through various control devices before being interpreted by and subsequently displayed on the display 516.
A hub interface 518 may allow the GMCH 508 and an input/output control hub (ICH) 520 to communicate. The ICH 520 may provide an interface to I/O (Input/Output) devices that communicate with the computing system 500. The ICH 520 may communicate with a bus 522 through a peripheral bridge (or controller) 524, such as a peripheral component interconnect (PCI) bridge, a universal serial bus (USB) controller, or other types of peripheral bridges or controllers. The bridge 524 may provide a data path between the CPU 502 and peripheral devices. Other types of topologies may be utilized. Also, multiple buses may communicate with the ICH 520, e.g., through multiple bridges or controllers. Moreover, other peripherals in communication with the ICH 520 may include, in various embodiments of the invention, integrated drive electronics (IDE) or small computer system interface (SCSI) hard drive(s), USB port(s), a keyboard, a mouse, parallel port(s), serial port(s), floppy disk drive(s), digital output support (e.g., digital video interface (DVI)), or other devices.
The bus 522 may communicate with an audio device 526, one or more disk drive(s) 528, and a network interface device 530, which may be in communication with the computer network 503. In an embodiment, the device 530 may be a NIC capable of wireless communication. Other devices may communicate via the bus 522. Also, various components (such as the network interface device 530) may communicate with the GMCH 508 in some embodiments of the invention. In addition, the processor 502, the GMCH 508, and/or the graphics interface 514 may be combined to form a single chip.
Furthermore, the computing system 500 may include volatile and/or nonvolatile memory (or storage). For example, nonvolatile memory may include one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), a disk drive (e.g., 528), a floppy disk, a compact disk ROM (CD-ROM), a digital versatile disk (DVD), flash memory, a magneto-optical disk, or other types of nonvolatile machine-readable media that are capable of storing electronic data (e.g., including instructions). In an embodiment, components of the system 500 may be arranged in a point-to-point (PtP) configuration such as discussed with reference to
As illustrated in
The processors 602 and 604 may be any suitable processor such as those discussed with reference to the processors 602 of
At least one embodiment of the invention may be provided by utilizing the processors 602 and 604. For example, the processors 602 and/or 604 may perform one or more of the operations of
The I/O subsystem 620 may be coupled to a bus 640 using a PtP interface circuit 641. The bus 640 may have one or more devices coupled to it, such as a bus bridge 642 and I/O devices 643. Via a bus 644, the bus bridge 643 may be coupled to other devices such as a keyboard/mouse 645, the network interface device 630 discussed with reference to
In various embodiments of the invention, the operations discussed herein, e.g., with reference to
In some embodiments, a computing device comprises: logic to receive permission information for guest physical mapping prior to utilization of paged memory by an Operating System (OS) based on the guest physical mapping, wherein the permission information is to be received through an Extended Page Table (EPT). A virtual machine monitor logic may isolate one or more memory pages corresponding a protected agent based on the one or more structures of the EPT that restrict access to the one or more pages in an untrusted view. The one or more memory pages may store code or data of the protected agent. The restricted access may be provided via read only mapping. A virtual machine monitor logic may isolate one or more memory pages corresponding a protected agent based on the one or more structures of the EPT that allow access to the one or more pages in a trusted view. The allowed access may be provided via read-execute, read-write, or execute-only mapping. The one or more memory pages may store code or data of the protected agent. A virtual machine monitor logic may process an EPT violation. A Page Fault (PF) handler logic may process page in and page out operations. The OS may comprise a re-entry stub to support program specific page in operations. The OS may comprise a virtual interrupt descriptor table exits stub to support general program page out operations.
In some embodiments, a method comprises: receiving permission information for guest physical mapping prior to utilization of paged memory by an Operating System (OS) based on the guest physical mapping, wherein the permission information is received through an Extended Page Table (EPT). A virtual machine monitor logic may isolate one or more memory pages corresponding a protected agent based on the one or more structures of the EPT that restrict access to the one or more pages in an untrusted view. Code or data of the protected agent may be stored in the one or more memory pages. A virtual machine monitor logic may isolate one or more memory pages corresponding a protected agent based on the one or more structures of the EPT that allow access to the one or more pages in a trusted view. The allowed access may be provided via read-execute, read-write, or execute-only mapping. Code or data of the protected agent may be stored in the one or more memory pages. A virtual machine monitor logic may process an EPT violation. A Page Fault (PF) handler logic may process page in and page out operations.
In some embodiments, a computer-readable medium comprises one or more instructions that when executed on a processor configure the processor to perform one or more operations to: receive permission information for guest physical mapping prior to utilization of paged memory by an Operating System (OS) based on the guest physical mapping, wherein the permission information is received through an Extended Page Table (EPT). The computer-readable medium may comprise one or more instructions that when executed on the processor configure the processor to perform one or more operations to isolate one or more memory pages corresponding a protected agent based on the one or more structures of the EPT that restrict access to the one or more pages in an untrusted view. The computer-readable medium may comprise one or more instructions that when executed on the processor configure the processor to perform one or more operations to store code or data of the protected agent in the one or more memory pages. The computer-readable medium may comprise one or more instructions that when executed on the processor configure the processor to perform one or more operations to provide the restricted access via read only mapping. The computer-readable medium may comprise one or more instructions that when executed on the processor configure the processor to perform one or more operations to isolate one or more memory pages corresponding a protected agent based on the one or more structures of the EPT that allow access to the one or more pages in a trusted view. The computer-readable medium may comprise one or more instructions that when executed on the processor configure the processor to perform one or more operations to provide the allowed access via read-execute, read-write, or execute-only mapping. The computer-readable medium may comprise one or more instructions that when executed on the processor configure the processor to perform one or more operations to store code or data of the protected agent in the one or more memory pages. The computer-readable medium may comprise one or more instructions that when executed on the processor configure the processor to perform one or more operations to process an EPT violation. The computer-readable medium may comprise one or more instructions that when executed on the processor configure the processor to perform one or more operations to process page in and page out operations. The OS may comprise a re-entry stub to support program specific page in operations. The OS may comprise a virtual interrupt descriptor table exits stub to support general program page out operations.
Additionally, such computer-readable media may be downloaded as a computer program product, wherein the program may be transferred from a remote computer (e.g., a server) to a requesting computer (e.g., a client) by way of data signals provided in a carrier wave or other propagation medium via a communication link (e.g., a bus, a modem, or a network connection).
Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, and/or characteristic described in connection with the embodiment may be included in at least an implementation. The appearances of the phrase “in one embodiment” in various places in the specification may or may not be all referring to the same embodiment.
Also, in the description and claims, the terms “coupled” and “connected,” along with their derivatives, may be used. In some embodiments of the invention, “connected” may be used to indicate that two or more elements are in direct physical or electrical contact with each other. “Coupled” may mean that two or more elements are in direct physical or electrical contact. However, “coupled” may also mean that two or more elements may not be in direct contact with each other, but may still cooperate or interact with each other.
Thus, although embodiments of the invention have been described in language specific to structural features and/or methodological acts, it is to be understood that claimed subject matter may not be limited to the specific features or acts described. Rather, the specific features and acts are disclosed as sample forms of implementing the claimed subject matter.
Number | Name | Date | Kind |
---|---|---|---|
5826041 | Ogus | Oct 1998 | A |
6378023 | Christie et al. | Apr 2002 | B1 |
6708272 | McCown et al. | Mar 2004 | B1 |
7444523 | Morais et al. | Oct 2008 | B2 |
7627758 | Tock et al. | Dec 2009 | B1 |
8171321 | Kumar et al. | May 2012 | B2 |
8244945 | Shanbhogue et al. | Aug 2012 | B2 |
9268707 | Sahita et al. | Feb 2016 | B2 |
20020082824 | Neiger et al. | Jun 2002 | A1 |
20020108050 | Raley et al. | Aug 2002 | A1 |
20020161891 | Higuchi et al. | Oct 2002 | A1 |
20020166070 | Mualem et al. | Nov 2002 | A1 |
20040062267 | Minami et al. | Apr 2004 | A1 |
20040153672 | Watt et al. | Aug 2004 | A1 |
20050039183 | Romero et al. | Feb 2005 | A1 |
20050132122 | Rozas | Jun 2005 | A1 |
20050182838 | Sheets et al. | Aug 2005 | A1 |
20050209876 | Kennis et al. | Sep 2005 | A1 |
20050223220 | Campbell et al. | Oct 2005 | A1 |
20050246716 | Smith et al. | Nov 2005 | A1 |
20050259678 | Gaur | Nov 2005 | A1 |
20050278722 | Armstrong et al. | Dec 2005 | A1 |
20060048221 | Morais et al. | Mar 2006 | A1 |
20060080553 | Hall | Apr 2006 | A1 |
20060143687 | O'Connor et al. | Jun 2006 | A1 |
20060174077 | Abadi et al. | Aug 2006 | A1 |
20060184549 | Rowney et al. | Aug 2006 | A1 |
20060190243 | Barkai et al. | Aug 2006 | A1 |
20060206887 | Dodge et al. | Sep 2006 | A1 |
20060236094 | Leung et al. | Oct 2006 | A1 |
20060272027 | Noble | Nov 2006 | A1 |
20070006175 | Durham | Jan 2007 | A1 |
20070028244 | Landis et al. | Feb 2007 | A1 |
20070192761 | Sahita et al. | Aug 2007 | A1 |
20070192854 | Kelley et al. | Aug 2007 | A1 |
20070266037 | Terry et al. | Nov 2007 | A1 |
20080022129 | Durham et al. | Jan 2008 | A1 |
20080059811 | Sahita et al. | Mar 2008 | A1 |
20080114916 | Hummel et al. | May 2008 | A1 |
20080133875 | Cohen | Jun 2008 | A1 |
20080134174 | Sheu | Jun 2008 | A1 |
20080155168 | Sheu | Jun 2008 | A1 |
20080201540 | Sahita et al. | Aug 2008 | A1 |
20080235793 | Schunter et al. | Sep 2008 | A1 |
20080244573 | Sahita et al. | Oct 2008 | A1 |
20090038017 | Durham et al. | Feb 2009 | A1 |
20090172328 | Sahita et al. | Jul 2009 | A1 |
20090172346 | Sahita et al. | Jul 2009 | A1 |
20090172438 | Kumar et al. | Jul 2009 | A1 |
20090222792 | Shanbhogue et al. | Sep 2009 | A1 |
20090241189 | Shanbhogue et al. | Sep 2009 | A1 |
20090327575 | Durham et al. | Dec 2009 | A1 |
20100031360 | Seshadri et al. | Feb 2010 | A1 |
20100169667 | Dewan | Jul 2010 | A1 |
20100169968 | Shanbhogue et al. | Jul 2010 | A1 |
20100333206 | Dewan et al. | Dec 2010 | A1 |
20120151168 | Tuch et al. | Jun 2012 | A1 |
20130024598 | Serebrin | Jan 2013 | A1 |
20130104234 | Northup | Apr 2013 | A1 |
20130125119 | Vipat | May 2013 | A1 |
20130227248 | Mehta | Aug 2013 | A1 |
20140122830 | Cohen | May 2014 | A1 |
20140245430 | Vipat | Aug 2014 | A1 |
Number | Date | Country |
---|---|---|
101944013 | Jan 2011 | CN |
0179401 | Apr 1986 | EP |
2006-065851 | Mar 2006 | JP |
2007-510198 | Apr 2007 | JP |
201032137 | Sep 2010 | TW |
2005036405 | Apr 2005 | WO |
2007027739 | Mar 2007 | WO |
2009069136 | Jun 2009 | WO |
2010078143 | Jul 2010 | WO |
2010078143 | Aug 2010 | WO |
Entry |
---|
Office Action Received for Japanese Patent Application No. 2011-536632, dated Jan. 15, 2013, 4 Pages of Office Action and 4 pages of English Translation. |
“Key BLOBs: Windows CE.NET”, from MSDN, Retrieved on Jan. 1, 2013 Webpage Available at: <http://msdn.microsoft.com/en-us/library/ms884374.aspx>, last updated Apr. 8, 2004, with copyright notice 1992-2003. |
Office Action Received for U.S. Appl. No. 12/347,890, dated Nov. 5, 2012, 24 pages. |
Shanbhogue et al., “Virtualization Enabled Integrity Services (VIS)”, Nov. 2007, 10 pages. |
Office Action Received for U.S. Appl. No. 12/347,890, dated Jun. 27, 2012, 25 Pages. |
Grevstad, Eric, “CPU-Based Security: The NX Bit Jupiterimages”, May 24, 2004, 4 pages. |
Office Action Received for U.S. Appl. No. 12/039,486, dated Aug. 3, 2012, 13 pages. |
Office Action received for U.S. Appl. No. 11/516,113, dated Nov. 6, 2009, 17 pages. |
International Search Report and Written Opinion received for Patent Application No. PCT/US2009/069136, dated Jun. 29, 2010, 6 pages. |
International Preliminary Report on Patentability Received for PCT Application No. PCT/US2009/069136, dated Jul. 5, 2011, 4 pages. |
Office Action Received for U.S. Appl. No. 11/516,113, dated May 21, 2010, 14 pages. |
Office Action Received for U.S. Appl. No. 12/459,359, dated Aug. 30, 2011, 23 pages. |
Office Action Received for U.S. Appl. No. 12/459,359, dated Jan. 6, 2012, 23 pages. |
Office Action Received for U.S. Appl. No. 11/395,488, dated Apr. 15, 2008, 20 pages. |
Office Action Received for U.S. Appl. No. 11/395,488, dated Apr. 27, 2009, 20 pages. |
Uhlig, Rich et al., “Intel Virtualization Technology”, IEEE Computer Society, May 2005, pp. 48-56. |
Notice of Allowance Received for the U.S. Appl. No. 12/050,862, dated Apr. 16, 2012, 5 pages. |
Office Action Received for U.S. Appl. No. 12/050,862, dated Mar. 18, 2011, 10 pages. |
Office Action Received fro U.S. Appl. No. 12/050,862, dated Oct. 19, 0211, 10 pages. |
Dewan, et al., “A Hypervisor-based system for protecting sofware runtime memory and persistent storage”, Apr. 2008. |
Sahita, et al., “Mitigating the Lying-Endpoint Problem in Virtualized Network Access Framework”, Oct. 2007. |
Tan, Min, “Home PC Maintenance with Intel AMT”, Intel Technology Journal, vol. 11, Issue 1, 12 (Feb. 15, 2007), pp. 57-66. |
Number | Date | Country | |
---|---|---|---|
20160170902 A1 | Jun 2016 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13730920 | Dec 2012 | US |
Child | 15051213 | US |