The presentation discusses the development of CastGuard, a technology aimed at solving illegal static downcasts in C++ to mitigate type confusion vulnerabilities. The technology is performant and has minimal impact on binary size and optimization. It is currently being tested in Hyper-V and will be rolled out to other Windows components in the future.
- Type confusion vulnerabilities are a significant bug class that can weaken security and bypass mitigations like memory tagging and hardware solutions.
- CastGuard is a technology developed to solve illegal static downcasts in C++ to mitigate type confusion vulnerabilities.
- Dynamic cast, the current solution for downcasts, is difficult to apply to a large code base and has significant overhead.
- CastGuard is performant, has minimal impact on binary size and optimization, and can potentially be used to accelerate Dynamic cast.
- CastGuard is currently being tested in Hyper-V and will be rolled out to other Windows components in the future.
The speaker explains that Dynamic cast, the current solution for downcasts, has significant overhead and can cause binary size bloat. They provide an example where turning on runtime type information (RTTI) for a DLL in Windows caused an 80% binary size regression. CastGuard, on the other hand, has a tiny binary size impact and optimizes well, making it a better solution for mitigating type confusion vulnerabilities.