linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] mm/slab: Improved sanity checking
@ 2019-05-30  4:50 Kees Cook
  2019-05-30  4:50 ` [PATCH 1/3] mm/slab: Validate cache membership under freelist hardening Kees Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kees Cook @ 2019-05-30  4:50 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Kees Cook, Matthew Wilcox, Alexander Popov, Alexander Potapenko,
	Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
	linux-kernel, linux-mm

Hi,

This adds defenses against slab cache confusion (as seen in real-world
exploits[1]) and gracefully handles type confusions when trying to look
up slab caches from an arbitrary page. (Also is patch 3: new LKDTM tests
for these defenses as well as for the existing double-free detection. To
avoid possible merge conflicts, I'd prefer patch 3 went via drivers/misc,
which I will send to Greg separately, but I've included it here to help
illustrate the issues.)

-Kees

[1] https://github.com/ThomasKing2014/slides/raw/master/Building%20universal%20Android%20rooting%20with%20a%20type%20confusion%20vulnerability.pdf

Kees Cook (3):
  mm/slab: Validate cache membership under freelist hardening
  mm/slab: Sanity-check page type when looking up cache
  lkdtm/heap: Add tests for freelist hardening

 drivers/misc/lkdtm/core.c  |  5 +++
 drivers/misc/lkdtm/heap.c  | 72 ++++++++++++++++++++++++++++++++++++++
 drivers/misc/lkdtm/lkdtm.h |  5 +++
 mm/slab.c                  | 14 ++++----
 mm/slab.h                  | 29 +++++++++------
 5 files changed, 107 insertions(+), 18 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-05-30  4:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30  4:50 [PATCH 0/3] mm/slab: Improved sanity checking Kees Cook
2019-05-30  4:50 ` [PATCH 1/3] mm/slab: Validate cache membership under freelist hardening Kees Cook
2019-05-30  4:50 ` [PATCH 2/3] mm/slab: Sanity-check page type when looking up cache Kees Cook
2019-05-30  4:50 ` [PATCH 3/3] lkdtm/heap: Add tests for freelist hardening Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox