Claims
- 1. A method of protecting a computer program against pointer corruption attacks, the method comprising the steps of:
encrypting a value of a pointer each time the value of the pointer is modified; and decrypting the encrypted value of the pointer before use each time the pointer is read.
- 2. A method according to claim 1 wherein said encrypting and decrypting steps are effected by instructions generated by a compiler during compilation of the said program.
- 3. A method according to claim 1 wherein said encrypting and decrypting steps are effected by XOR'ing the pointer with a predetermined encryption key value.
- 4. A method according to claim 3 including selecting the key value at random.
- 5. A method according to claim 1 including storing the pointer value in the clear only in CPU registers and storing the encrypted value of the pointer in addressable memory.
- 6. A method according to claim 1 wherein instructions to implement said encryption and decryption steps are inserted into the program in a preprocessor.
- 7. A method according to claim 1 wherein instructions to implement said encryption and decryption steps are inserted by a compiler during manipulation of an intermediate representation of the program.
- 8. A method according to claim I wherein instructions to implement said encryption and decryption steps are inserted by a compiler in the context of an architecture-dependent representation by transforming instructions to load pointer values from memory into registers to add the decryption instructions, and transform the saving of pointer values from registers to memory to add the encryption instructions.
- 9. A method according to claim 1 to protect the encryption key from tampering.
- 10. A method of protecting a computer program against pointer corruption attacks while employing a shared library, the method comprising the steps of:
in the library, responsive to a function call, exporting at least two versions of the called function, including a first version and a second version, wherein one of the first and second versions effects pointer protection by encrypting a value of a pointer each time the value of the pointer is modified; and decrypting the encrypted value of the pointer each time the pointer is read.
RELATED APPLICATIONS
[0001] This is a continuation of and claims priority from U.S. provisional application number 60/337,199 filed Dec. 6, 2001.
FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT
[0002] DARPA contract no. N66001-00-C-8032.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60337199 |
Dec 2001 |
US |