The MemGuard variant of StackGuard suffers substantial performance penalties compared to the Canary variant, for reasons described in Section 3.2. Section 4.1 showed that the MemGuard variant provides better security protection for stack attacks than the Canary variant (specifically, MemGuard stopped the SuperProbe attack, and guessing canary values will not help get past MemGuard). This section measures the cost of that added protection.
The MemGuard variant of StackGuard is still under development, but as of this writing, we have some preliminary results. We have measured the performance of two versions of MemGuard StackGuard:
|Increment||Standard||MemGuard Register||%||MemGuard VM||%|
|void inc(int *)||47.7||1820||5400%||40,420||123,800%|
Table 3 shows the overhead costs for the MemGuard variant of StackGuard. Because of the use of a heavy-weight system call to access privileged hardware for protection, function calls slow down by for the MemGuard Register protection. The additional penalty of page protection fault handling for false sharing of the page on the top of the stack raises the cost of function calls by . Proper use of the debugging registers as a cache for the VM mechanism should bring the costs in line with the MemGuard Register costs.