linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Assorted improvements to usercopy
@ 2022-01-10 23:15 Matthew Wilcox (Oracle)
  2022-01-10 23:15 ` [PATCH 1/4] mm/usercopy: Check kmap addresses properly Matthew Wilcox (Oracle)
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Matthew Wilcox (Oracle) @ 2022-01-10 23:15 UTC (permalink / raw)
  To: Kees Cook; +Cc: Matthew Wilcox (Oracle), linux-mm, linux-hardening

The HARDENED_USERCOPY_PAGESPAN config option is hard to turn on because
much of the kernel uses non-compound high-order page allocations.
This patchset extracts the valuable parts of HARDENED_USERCOPY_PAGESPAN
and then removes the remainder.

v5:
 - Use get_vm_area_size() instead of ->size directly (Mark Hemment)
 - Rebase to current Linus (the slab merge changed a lot of code)
v4:
 - Add the fourth patch to remove HARDENED_USERCOPY_PAGESPAN
v3:
 - Remove a now-unused variable
v2:
 - Prevent a NULL pointer dereference when a vmalloc-range pointer
   doesn't have an associated allocation (me)
 - Report better offsets than "0" (Kees)

Matthew Wilcox (Oracle) (4):
  mm/usercopy: Check kmap addresses properly
  mm/usercopy: Detect vmalloc overruns
  mm/usercopy: Detect large folio overruns
  usercopy: Remove HARDENED_USERCOPY_PAGESPAN

 arch/x86/include/asm/highmem.h   |  1 +
 include/linux/highmem-internal.h | 10 ++++
 mm/usercopy.c                    | 97 +++++++++-----------------------
 security/Kconfig                 | 13 +----
 4 files changed, 39 insertions(+), 82 deletions(-)

-- 
2.33.0


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

end of thread, other threads:[~2022-05-10 22:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 23:15 [PATCH 0/4] Assorted improvements to usercopy Matthew Wilcox (Oracle)
2022-01-10 23:15 ` [PATCH 1/4] mm/usercopy: Check kmap addresses properly Matthew Wilcox (Oracle)
2022-05-10  3:37   ` Andrew Morton
2022-05-10 22:01     ` Kees Cook
2022-01-10 23:15 ` [PATCH 2/4] mm/usercopy: Detect vmalloc overruns Matthew Wilcox (Oracle)
2022-01-10 23:15 ` [PATCH 3/4] mm/usercopy: Detect large folio overruns Matthew Wilcox (Oracle)
2022-01-31 14:28   ` David Hildenbrand
2022-01-10 23:15 ` [PATCH 4/4] usercopy: Remove HARDENED_USERCOPY_PAGESPAN Matthew Wilcox (Oracle)
2022-01-12 23:08   ` Kees Cook
2022-01-31 14:27   ` David Hildenbrand
2022-01-31 19:27     ` Matthew Wilcox

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).