Steven Evans edited Overview_A_control_flow_hijacking__.md  about 8 years ago

Commit id: 017c54787fd482e393aef1afb78f4a95dafcbc52

deletions | additions      

       

Security vulnerability attacks can possibly occur at any buffer through a buffer overflow. The ideal location to add a pledge call is directly after a system call in order to disclude its use so it cannot be used by any security vulnerability attack following that system call. However, if there is a subsequent use of that same system call later in the execution of the program, the pledge should only be placed after that last execution. If the pledge was placed after the first execution of a system call, the normal execution of the program would fail on any subsequent execution of the same system call.  (THIS PARAGRAPH MIGHT BELONG IN IMPLEMENTATION)  Loops and recursion must be known during the analysis so that any system call within a loop or recursive function is not removed from use by a pledge before the loop or recursive function is finished executing. Therefore, an amount of context needs to be known about whether or not the program if a function  is in called from within  a loop or recursive function. function, that context needs to be passed in so that pledge calls will not be inserted.