linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] bug: Provide toggle for BUG on data corruption
@ 2016-08-16 21:11 Kees Cook
  2016-08-16 21:11 ` [PATCH 1/5] list: Split list_add() debug checking into separate function Kees Cook
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Kees Cook @ 2016-08-16 21:11 UTC (permalink / raw)
  To: Paul E . McKenney
  Cc: Kees Cook, Stephen Boyd, Daniel Micay, Arnd Bergmann,
	Greg Kroah-Hartman, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Peter Zijlstra, Ingo Molnar,
	Tejun Heo, Michael Ellerman, Aneesh Kumar K.V,
	Kirill A. Shutemov, Andrew Morton, Dan Williams, Jan Kara,
	Josef Bacik, Thomas Gleixner, Andrey Ryabinin,
	Nikolay Aleksandrov, Dmitry Vyukov, linux-kernel,
	kernel-hardening

This adds a CONFIG to trigger BUG()s when the kernel encounters
unexpected data structure integrity as currently detected with
CONFIG_DEBUG_LIST, CONFIG_DEBUG_SPINLOCK, and with workqueues.

Specifically list operations have been a target for widening flaws to gain
"write anywhere" primitives for attackers, so this also consolidates the
debug checking to avoid code and check duplication (e.g. RCU list debug
was missing a check that got added to regular list debug). It also stops
manipulations when corruption is detected, since worsening the corruption
makes no sense. (Really, everyone should build with CONFIG_DEBUG_LIST
since the checks are so inexpensive.)

This is mostly a refactoring of similar code from PaX and Grsecurity,
along with MSM kernel changes by Stephen Boyd.

Along with the patches is a new lkdtm test to validate that setting
CONFIG_DEBUG_LIST actually does what is desired.

Thanks,

-Kees

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-08-17 16:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16 21:11 [PATCH 0/5] bug: Provide toggle for BUG on data corruption Kees Cook
2016-08-16 21:11 ` [PATCH 1/5] list: Split list_add() debug checking into separate function Kees Cook
2016-08-16 21:11 ` [PATCH 2/5] rculist: Consolidate DEBUG_LIST for list_add_rcu() Kees Cook
2016-08-16 21:11 ` [PATCH 3/5] list: Split list_del() debug checking into separate function Kees Cook
2016-08-16 21:11 ` [PATCH 4/5] bug: Provide toggle for BUG on data corruption Kees Cook
2016-08-16 21:26   ` Paul E. McKenney
2016-08-16 21:42     ` Kees Cook
2016-08-16 21:53       ` Steven Rostedt
2016-08-16 21:57         ` Steven Rostedt
2016-08-16 23:14           ` Kees Cook
2016-08-17  0:01       ` Paul E. McKenney
2016-08-17  0:09         ` Kees Cook
2016-08-17 16:09           ` Paul E. McKenney
2016-08-17 16:14             ` Kees Cook
2016-08-17 16:32               ` Paul E. McKenney
2016-08-16 21:50   ` Laura Abbott
2016-08-16 23:11     ` Kees Cook
2016-08-16 21:11 ` [PATCH 5/5] lkdtm: Add tests for struct list corruption Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).