1. Field of the Invention
This invention relates generally to the field of data processing systems. More particularly, the invention relates to a system and method for providing tamper-resistant network security within a computer system.
2. Description of the Related Art
Computer security is one of the burning issues that corporations around the world face today. Security breaches have caused billions of dollars worth of losses as a result of attacks caused by viruses, worms, trojan horses, data theft via computer system break-ins, buffer overflow problems and various additional types of computer threats. A variety of products employing a wide range of features and complexity are available today, but none of them offers a complete solution.
Many security-related problems are due to memory corruption. As such, the software-based security products that run on desktops and servers are vulnerable. For example, viruses are capable of modifying the program code of an infected program and may corrupt the data buffers/blocks used by the program. There is no way for a program to monitor/protect its own code/data, unless underlying support exists in the hardware of the computer system.
What is needed, therefore is a hardware-based security mechanism which is more robust and reliable than that provided with current systems.
A better understanding of the present invention can be obtained from the following detailed description in conjunction with the following drawings, in which:
Described below is a system and method for implementing network security using a sequestered partition. Throughout the description, for the purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. In other instances, well-known structures and devices are shown in block diagram form to avoid obscuring the underlying principles of the present invention.
One embodiment of the invention is implemented within the context of a physical CPU in a multiprocessor system or a logical CPU i.e. a hyper-thread of a HT enabled CPU or a core of a multi-core CPU in a single or multiprocessor environment. Hyper-threading refers to a feature of certain CPUs (such as the Pentium® 4 designed by Intel) that makes one physical CPU appear as two logical CPUs to the operating system (“OS”). It uses a variety of CPU architectural enhancements to overlap two instruction streams, thereby achieving a significant gain in performance. For example, it allows certain resources to be duplicated and/or shared (e.g., shared registers). Operating systems may take advantage of the hyper-threaded hardware as they would on any multi-processor or multi-core CPU system.
Although the embodiments of the invention described below focus on a hyper-threaded implementation, the underlying principles of the invention are not limited to such an implementation. By way of example, and not limitation, the underlying principles of the invention may also be implemented within a multi-processor or multi-core CPU system.
In addition, in one embodiment, the techniques described herein are implemented within an Extended Firmware Interface (“EFI”)-compliant computer platform. EFI is a specification that defines the interface between a computer's firmware (commonly referred to as the “Basic Input Output System” or “BIOS”) and the OS. The interface consists of data tables that contain platform-related information, as well as boot and runtime service calls that are available to the operating system and its loader. Together, these provide a standard environment for booting an OS and running pre-boot applications. Although some of the embodiments described below are implemented within an EFI-compliant system, it should be noted that the underlying principles of the invention are not limited to any particular standard.
In one embodiment of the invention, prior to handling control over to the OS or the OS loader, the EFI sequesters a hyper-thread and a portion of the computer system's Random-Access Memory (“RAM”) for its use. The combination of the sequestered hyper-thread and RAM may be referred to herein as a “sequestered partition” or “S-Partition.” More generally, the S-Partition may include any set of system resources not accessible to the OS. By contrast, the “OS Partition” includes the OS itself and the computing resources made available to the OS.
In one embodiment of the invention, the following set of operations are used to establish communication between the OS-Partition 100 and the S-Partition 110:
1. Sequester a Partition
To sequester a partition, a subset of the computer system's resources are segregated from the OS (i.e., set apart from the resources made visible to the OS). The partition may contain one or more physical CPUs or logical CPUs, or any combination thereof (e.g., a hyper-thread or other type of logically separable processing element), and enough RAM 130 to run the specialized program code described herein. Note that depending on the application one or more devices such as a Peripheral Component Interconnect (“PCI”) network adapter may also be included within the partition.
Sequestering of system resources is performed by the firmware 111 before the OS loads. For example, in one embodiment, RAM is sequestered by manipulating the physical memory map provided to the OS when the OS is booted up. More specifically, in one embodiment, a block of memory 130 is removed from the view of the OS by resizing or removing entries from the memory map. Moreover, in one embodiment, AP 112 (which may be a hyper-thread or a physically distinct CPU) is sequestered by modifying the Advanced Configuration and Power Interface (“ACPI”) table passed to the OS at boot time to exclude the ID of the sequestered AP 112 and its Advanced Programmable Interrupt Controller (“APIC”) from the table. For processors that support hyper-threading, concealing a physical core includes excluding both of its hyper-threads from the ACPI table.
2. Load Specialized Code on the Sequestered CPU and Boot the OS
During platform initialization, the firmware 111 is executed on a single logical CPU, i.e., the BSP 102. All other hyper-threads or cores are either halted or waiting for instructions. Prior to booting the OS, the CPU 102 indicates to the sequestered CPU, i.e., the AP 112 to start executing the specialized code which is pre-loaded into the sequestered block of RAM 130. In one embodiment, the specialized code waits for an OS-resident driver 101 to define the shared memory area 132, where data exchange between the two partitions 100, 110 will occur. The firmware 111 then disables all interrupts. In one embodiment, it does this by raising the task priority level (“TPL”) and loading the OS. Raising the TPL is typically as good as disabling the interrupts. This means while the OS is booting, it does not want to get interrupted by devices. Once the OS is ready to service interrupts, the TPL is restored.
3. Establish a Communication Link
As mentioned above, communication between the OS-Partition 100 and the S-Partition 110 is accomplished using a customized kernel driver 101. In one embodiment, the OS loads the driver 101 as a result of detecting a particular device on the PCI bus such as a network interface card (“NIC”), or through manual installation of a virtual device such as a virtual miniport. The former case involves replacing the NIC device's standard driver with a modified version that “talks” to the S-partition instead of talking directly to the NIC device. The latter case precludes the need for a physical device.
Once loaded, the driver registers an interrupt with the OS, extracts its interrupt vector, allocates a non-pageable shared region of memory 132, stores the interrupt vector in it, and marks the beginning of the segment with a unique multi-byte signature. In one embodiment, the specialized program code running on the AP 112 within the S-Partition 110 continuously scans the memory 120 for this signature. Once found, it extracts the interrupt vector of the OS-resident driver 101 and stores its own interrupt vector to enable inter-partition communication.
In one embodiment, the signature is a 16 byte pattern, although the underlying principles are not limited to any particular byte length or pattern. Scanning is performed by first reading bytes 0-15 and comparing them to the previously agreed-upon pattern. If the matching fails, bytes 1-16 are read and compared, then 2-17, etc. In one embodiment, to make the search more efficient, single instruction multiple data (“SIMD”) instructions are used for the comparison. More specifically, Single SIMD Extension 3 (“SSE3”) instructions and extended multimedia (“XMM”) registers may be used which allow the comparison of 16 byte arrays in a single instruction (e.g., such as the PCMPEQW instruction).
4. Exchange Data:
Once the shared memory region 132 has been allocated and interrupt vectors have been swapped as described above, both partitions are ready to exchange information. The particular semantics of the inter-partition protocol depend on the particular application at hand. For instance, for network stack offloading (such as that described below), the shared memory area may be allocated into a transmit (Tx) and a receive (Rx) ring of buffers. Signaling may be a accomplished through inter-processor interrupts (“IPIs”) using the initial exchange of interrupt vectors, or via polling, in which case one or both sides monitor a particular memory location to determine data readiness.
The timing diagram illustrated in
At 202, the BSP initializes the platform by performing basic BIOS operations (e.g., testing memory, etc). At 203, the BSP offloads runtime functionality by sequestering system resources as described above. For example, the BSP may remove entries from the memory map to sequester a block of memory and sequester the AP from the OS-Partition as described above. At 204, the BSP disables all interrupts (e.g., by raising the task priority level (“TPL”)) and at 205 the BSP boots the OS. At 206, the AP waits for the OS to boot. At 207, the BSP loads the custom driver 101 which, at 209, allocates the shared memory region 132. At 208, the AP enables interrupts so that it may communicate with the BSP using IPIs and, at 211, begins to scan the shared memory region for the unique byte pattern. At 210 the BSP determines the interrupt vector to be exchanged with the AP and stores it in shared memory. At 212, the BSP marks the shared memory with the unique pattern, which is then identified by the AP via the scanning process 211. At this stage the AP may communicate with and send IPIs to the BSP. The AP enters into a loop at 214 in which it waits for the BSP to write to shared memory. In one embodiment, this is accomplished with the monitor/mwait instructions mentioned above. The BSP writes to shared memory at 215 and the data is accessed by the AP.
In sum, using the techniques described above, an additional, isolated execution environment is provided and monitor/mwait instructions are used to implement the signaling mechanism between the S-partition and the OS.
In one embodiment, the foregoing inter-partition communication techniques are used to provide a network security subsystem in an isolated, tamper-proof and secure environment. Specifically, one embodiment of the invention diverts incoming and outgoing data packets/frames to a network security subsystem (“NSS”) running within the context of the sequestered partition/CPU. Specifically, in one embodiment illustrated in
In addition, one embodiment of the NSS partition includes a firewall/deep packet inspection module 304 (hereinafter “firewall module 304”) which applies firewall, virtual private network (“VPN”), and/or admission control rules to the frames/packets. Various analysis and filtering techniques may be implemented by the firewall module 304 while still complying with the underlying principles of the invention (e.g., filtering based on blacklists, type of content, virus detection, etc). The NSS partition 301 indicates to the NIC diver 302 when all rules have been applied. In one embodiment, this causes the NIC driver 302 to start acknowledging all processed received (Rx) packets/frames to the network stack 301 or send all (Tx) packets/frames out on the network via the NIC 303. Thus, using asynchronous communication mechanisms such as Inter Processor Interrupts (“IPIs”) the OS partition 300 and the NSS partition 301, interact with each other in a non-blocking fashion.
Signaling between the OS partition 300 and NSS partition 301 may use the same techniques described above in
Referring now to
Referring now to
It should be noted that the network stack 301 illustrated in
Embodiments of the invention may include various steps as set forth above. The steps may be embodied in machine-executable instructions which cause a general-purpose or special-purpose processor to perform certain steps. Alternatively, these steps may be performed by specific hardware components that contain hardwired logic for performing the steps, or by any combination of programmed computer components and custom hardware components.
Elements of the present invention may also be provided as a machine-readable medium for storing the machine-executable instructions. The machine-readable medium may include, but is not limited to, flash memory, optical disks, CD-ROMs, DVD ROMs, RAMs, EPROMs, EEPROMs, magnetic or optical cards, propagation media or other type of machine-readable media suitable for storing electronic instructions. For example, the present invention may be downloaded as a computer program which may be transferred from a remote computer (e.g., a server) to a requesting computer (e.g., a client) by way of data signals embodied in a carrier wave or other propagation medium via a communication link (e.g., a modem or network connection).
Throughout the foregoing description, for the purposes of explanation, numerous specific details were set forth in order to provide a thorough understanding of the invention. It will be apparent, however, to one skilled in the art that the invention may be practiced without some of these specific details. For example, a variety of different encryption/decryption and firewall protocols may be used to encrypt/decrypt and filter data traffic, respectively, while still complying with the underlying principles of the invention (e.g., layer 2 Extensible Authentication protocol (“EAP”)/802.1x, layer 3 Secure Sockets Layer (“SSL”)/Transport Layer Security (“TLS”), etc). In addition, the sequestered partition described herein may be configured to process data traffic at any layer of the OSI stack (e.g., data-link, network, transport, session, etc). Moreover, the underlying principles of the invention are not limited to any particular type of firewall/packet filtering processing.
In fact, the underlying inter-partition communication techniques described above with respect to
Accordingly, the scope and spirit of the invention should be judged in terms of the claims which follow.