Cyber Risks · Trail of Bits Blog

Use GWP-ASan to detect exploits in production environments

Summary: Trail of Bits explains GWP-ASan, a sampling-based allocation sanitizer that instruments a random fraction of heap allocations - typically less than 0.1% - and places them in isolated regions with inaccessible guard pages to detect double-free, use-after-free, and heap-buffer-overflow errors in production. Unlike AddressSanitizer, which carries 2 to 4 times performance overhead and is unsuitable for production, GWP-ASan runs with near-native performance and is available through LLVM's Scudo allocator via the -fsanitize=scudo flag, with default parameters of 16 MaxSimultaneousAllocations and a SampleRate of 5000.

Bottom line: GWP-ASan trades detection certainty for speed: with a SampleRate of 10, the tool detected a use-after-free only once every 10 executions in the post's example, meaning bugs can occur many times before being caught - so a security leader deploying it is accepting that some exploits will land before the first crash report.

Read the original at Trail of Bits Blog ↗

Topics
Zero-Days & Exploits
Related