Search

EP-4202740-B1 - PROCESS OBJECT RE-KEYING DURING PROCESS CREATION IN CRYPTOGRAPHIC COMPUTING

EP4202740B1EP 4202740 B1EP4202740 B1EP 4202740B1EP-4202740-B1

Inventors

  • GREWAL, KARANVIR
  • DURHAM, DAVID M.
  • LEMAY, MICHAEL
  • SULTANA, SALMIN
  • DEUTSCH, SERGEJ

Dates

Publication Date
20260506
Application Date
20221012

Claims (14)

  1. An apparatus, comprising processing circuitry (702) to: detect execution of a fork() operation in a cryptographic computing system that generates a parent process and a child process; assign a parent kernel data structure to the parent process and a child kernel data structure to the child process; detect, in the child process, a write operation comprising write data and a cryptographic target address, the write data consisting of an object, and in response to the write operation: block access to a corresponding page in the parent process; allocate a new physical child-private page in memory (704, 720) for the child process; copy the write data, i.e. the object that is re-encrypted with a cryptographic key unique to the child process, to the new physical child-private page; and fill the rest of the new physical child-private page in memory (704, 720) with magic marker data.
  2. The apparatus of claim 1, wherein the magic marker data comprises a unique code that causes the processor to: decrypt data from the corresponding page in the parent process using a cryptographic key unique to the parent process; encrypt the data from the corresponding page in the parent process using the cryptographic key unique to the child process; and write the data from the corresponding page in the parent process to the new physical page in memory (704, 720) for the child process.
  3. The apparatus of any one of claims 1 - 2, wherein the magic marker data comprises a unique code that causes the processor to: trigger an exception in a software process.
  4. The apparatus of any one of claims 1 - 3, the processing circuitry (702) to: detect a copy-on-write in the child process; and allocate a new private physical page in memory (704, 720) for the parent process.
  5. The apparatus of any one of claims 1 - 4, the processing circuitry (702) to: encrypt the data from the corresponding page in the parent process using allocation metadata unique to the child process.
  6. The apparatus of any one of claims 1 - 5, the processing circuitry (702) to: encrypt the data from the corresponding page in the parent process in response to a linear inline metadata, LIM, access fault in the child process.
  7. The apparatus of any one of claims 5 - 6, wherein valid metadata locations are indicated using an out-of-band indicator for each metadata location.
  8. A method, comprising: detecting execution of a fork() operation in a cryptographic computing system that generates a parent process and a child process; assigning a parent kernel data structure to the parent process and a child kernel data structure to the child process; detecting, in the child process, a write operation comprising write data and a cryptographic target address, the write data consisting of an object, and in response to the write operation: blocking access to a corresponding page in the parent process; allocating a new physical child-private page in memory (704, 720) for the child process; copying the write data, i.e. the object that is re-encrypted with a cryptographic key unique to the child process, to the new physical child-private page; and filling the rest of the new physical child-private page in memory (704, 720) with magic marker data.
  9. The method of claim 8, further comprising: decrypting data from the corresponding page in the parent process using a cryptographic key unique to the parent process; encrypting the data from the corresponding page in the parent process using the cryptographic key unique to the child process; and writing the data from the corresponding page in the parent process to the new physical page in memory (704, 720) for the child process.
  10. The method of any one of claims 8 - 9, further comprising: triggering an exception in a software process.
  11. The method of any one of claims 8 - 10, further comprising: encrypting the data from the corresponding page in the parent process using allocation metadata unique to the child process.
  12. The method of any one of claims 8 - 11, further comprising: detecting a copy-on-write in the child process; and allocating a new private physical page in memory (704, 720) for the parent process.
  13. The method of any one of claims 8 - 12, further comprising: encrypting the data from the corresponding page in the parent process in response to a linear inline metadata, LIM, access fault in the child process.
  14. The method of any one of claims 11 or 13, wherein valid metadata locations are indicated using an out-of-band indicator for each metadata location.

Description

BACKGROUND Subject matter described herein relates generally to the field of computer security and more particularly to process re-keying during process creation in cryptographic capability computing. An object-level granularity memory encryption system needs to change and refresh data encryption keys to prevent replay attacks and to defend against the wearing out of encryption keys or to separate parent and child processes. In Unix-like systems, a fork() system call creates a child process identical to the parent process, i.e., parent and child execute the same program, share physical pages and other resources. Whenever any of the parent/child processes want to modify a shared page, a Unix copy-on-write (CoW) mechanism allocates a new private physical page to the process that issued a write operation to the shared page. This way, eventually, the parent and child process may have separate address spaces for writable data. Typically, child processes execute an exec*() instruction after a fork() instruction to reload the process with the new binary and address space. There are, however, fork() instruction only cases such as parent process spawning child worker processes (e.g., Apache httpd, dhclient) to perform various tasks in separate processes than the main process. In a fork() and exec*() model, new encryption keys may be initialized for the child at exec*(). Accordingly, techniques to assign new cryptographic keys to a fork() only child process considering copy on write may find utility and per-object encryption where multiple independent encrypted objects may reside on the same memory page. Paper "Siddhartha Chhabra; et al.: SecureME: A Hardware-Software Approach to Full System Security. ICS '11: Proceedings of the international conference on Supercomputing, May 2011, Pages 108-119" relates to a hardware-software mechanism called SecureME, which provides a secure computing environment. Document US 2020 159 675 A1 relates to measures against buffer overflow attacks, which may be caused by using an indirect address and which may allow an attacker to insert malicious code into a computer program. Document US 2015 100 791 A1 relates to measures for protecting the privacy and integrity of application data. BRIEF DESCRIPTION OF THE DRAWINGS The detailed description is described with reference to the accompanying figures. Fig. 1 is a schematic, block diagram illustration of components of apparatus to implement process re-keying during process creation in cryptographic computing in accordance with some examples.Fig. 2 is a schematic illustration of memory allocation in an implementation of process re-keying during process creation in cryptographic computing in accordance with some examples.Fig. 3 is a schematic illustration of memory allocation in an implementation of process re-keying during process creation in cryptographic computing in accordance with some examples.Fig. 4 is a diagram illustrating operations in a method to implement process re-keying during process creation in cryptographic computing in accordance with some examples.Fig. 5 is a diagram illustrating operations in a method to implement data process re-keying during process creation in cryptographic computing in accordance with some examples.Fig. 6 is a schematic illustration of a cryptographic pointer which may be used in a method to implement process re-keying during process creation in cryptographic computing in accordance with some examples.Fig. 7 is a schematic illustration of a computing architecture which may be adapted to implement process re-keying during process creation in cryptographic computing in accordance with some examples. DETAILED DESCRIPTION Described herein are exemplary systems and methods to implement process re-keying during process creation in cryptographic computing. The invention is defined in the independent claims. Preferred embodiments are defined in the dependent claims. In the following description, numerous specific details are set forth to provide a thorough understanding of various examples. However, it will be understood by those skilled in the art that the various examples may be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been illustrated or described in detail so as not to obscure the examples. References in the specification to "one embodiment," "an embodiment," "an illustrative embodiment," etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may or may not necessarily include that particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to effect such feature, structure, or characteristic in conn