[go: up one dir, main page]

|
|
Log in / Subscribe / Register

About stack depth overflow

About stack depth overflow

Posted Mar 7, 2018 20:42 UTC (Wed) by a13xp0p0v (guest, #118926)
Parent article: Preventing kernel-stack leaks

Thanks for a nice article, Jonathan.

Let me correct the description of the STACKLEAK gcc plugin. The plugin performs two kinds of the kernel code instrumentation:

1. It inserts track_stack() calls for tracking the lowest border of the kernel stack. That is needed for erasing only the used part of the kernel stack at the end of syscalls. But that is _not_ used for detecting the stack depth overflow.

2. The plugin inserts the check_alloca() call before each alloca in the kernel. That blocks the Stack Clash attack against the kernel stack. So the combination of STACKLEAK, VMAP_STACK (providing the guard pages) and THREAD_INFO_IN_TASK protects the kernel against known stack depth overflow attacks.

I've described that in the last patch of the series, which updates Documentation/security/self-protection.rst.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds