Comment

Comment by shaded-enmity

A simple policy that both set_fs() calls need to happen within the same function body with corresponding CI test based on AST/DWARF inspection would have also prevented it. Do you really want to rely on stack unwinding/destructors for security sensitive code when stack is usually the first thing that gets controlled by the attacker? Exception handling (SEH) on Windows is an exploitation vector of it's own.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton