Bug Classes/Stack overflow

From Linux Kernel Security Subsystem
Revision as of 21:33, 4 November 2015 by KeesCook (talk | contribs) (Created page with "= Details = The traditional bug results in the stack buffer being written past the end of the stack frame, which allows the saved instruction pointer to be overwritten in orde...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Details

The traditional bug results in the stack buffer being written past the end of the stack frame, which allows the saved instruction pointer to be overwritten in order to gain execution control. Other attacks could stay within the stack frame, manipulating local variables ("data only" attacks). Some attacks allow for arbitrary offsets between kernel stacks to be written.

Examples

* half-nelson.c This uses stack offsets, rather than the traditional buffer overflow.

Mitigations

* stack canaries (e.g. gcc's -fstack-protector and -fstack-protector-strong)
* kernel stack location randomization
* shadow stacks