Skip to contentSkip to conversation

usercopy: Disable CONFIG_HARDENED_USERCOPY_PAGESPAN

PATCH In review Kees Cook 2 participants 2 messages Mar 24, 2022 – Mar 25, 2022 Security (LSM)

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 usercopy: Disable CONFIG_HARDENED_USERCOPY_PAGESPAN

CONFIG_HARDENED_USERCOPY_PAGESPAN has been mostly broken for a while, and it has become hard to ignore with some recent scsi changes[1]. While there is a more complete series to replace it with better checks[2], it should have more soak time in -next. Instead, disable the config now, with the expectation that it will be fully replaced in the next kernel release.

[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/linux-hardening/[email protected]/

Cc "Matthew Wilcox (Oracle)" <[email protected]>
---
 security/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/Kconfig +1 -1
index 0b847f435beb..88a0bc8c592b 100644
@@ -166,7 +166,7 @@ config HARDENED_USERCOPY
 config HARDENED_USERCOPY_PAGESPAN
 	bool "Refuse to copy allocations that span multiple pages"
 	depends on HARDENED_USERCOPY
-	depends on EXPERT
+	depends on BROKEN
 	help
 	  When a multi-page allocation is done without __GFP_COMP,
 	  hardened usercopy will reject attempts to copy it. There are,
Signature · 1 line
2.32.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Kees Cook

CONFIG_HARDENED_USERCOPY_PAGESPAN has been mostly broken for a while, and it has become hard to ignore with some recent scsi changes[1]. While there is a more complete series to replace it with better checks[2], it should have more soak time in -next. Instead, disable the config now, with the expectation that it will be fully replaced in the next kernel release.

Quoted 6 lines

[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/linux-hardening/[email protected]/

Cc "Matthew Wilcox (Oracle)" <[email protected]>

I'd prefer to just remove the code, but this is better than nothing: