Patent ID: 9600663
Date: 2017-03-21
CPC Classifications: G06F

Claim:
1. A method for protecting from buffer overflow vulnerability due to placement new constructs, the method comprising: detecting whether there is an instruction in a program which would lead to buffer overflow; checking whether the instruction is a placement new instruction which would result in an object overwriting contents in a memory area; selecting a method for preventing the buffer overflow if the instruction is the placement new instruction which would result in the object overwriting the contents in the memory area, wherein the selected method prevents the buffer overflow from occurring by controlling an allocation of the object to permit placement of the object in one or more memory regions; wherein the selection of the method is based on at least one predetermined policy; wherein the selected method is selected from at least a first method and a second method; wherein the first method takes into consideration that a given execution of the program will not reach all parts of the object and comprises populating a portion of the memory area allocated by the placement new instruction with less than a total of the object; wherein the second method comprises allocating portions of the object to respective memory regions, wherein the respective memory regions are in different systems; and wherein the predetermined policy dictates one or more operations to be performed on the object in order to prevent the buffer overflow from occurring, the one or more operations comprising: