KASAN: prohibit KASAN+STRUCTLEAK combination
PATCH 1/1 KASAN: prohibit KASAN+STRUCTLEAK combination
Currently STRUCTLEAK inserts initialization out of live scope of variables from KASAN point of view. This leads to KASAN false positive reports. Prohibit this combination for now.
Signed-off-by Dmitry Vyukov <[email protected]>
Cc Fengguang Wu <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Andrey Ryabinin <[email protected]>
Cc Kees Cook <[email protected]>
---
This combination leads to periodic confusion
and pointless debugging:
https://marc.info/?l=linux-kernel&m=151991367323082
https://marc.info/?l=linux-kernel&m=151992229326243
https://lkml.org/lkml/2017/11/30/33
--- arch/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/Kconfig +4 -0
@@ -464,6 +464,10 @@ config GCC_PLUGIN_LATENT_ENTROPY config GCC_PLUGIN_STRUCTLEAK bool "Force initialization of variables containing userspace addresses" depends on GCC_PLUGINS + # Currently STRUCTLEAK inserts initialization out of live scope of + # variables from KASAN point of view. This leads to KASAN false + # positive reports. Prohibit this combination for now. + depends on !KASAN help This plugin zero-initializes any structures containing a __user attribute. This can prevent some classes of information
Signature · 1 line
2.17.0.484.g0c8726318c-goog
arch/Kconfig config GCC_PLUGIN_LATENT_ENTROPY · line 470
Quoted 10 lines · Dmitry Vyukov
arch/Kconfig +4
-0@@ -464,6 +464,10 @@ config GCC_PLUGIN_LATENT_ENTROPY config GCC_PLUGIN_STRUCTLEAK bool "Force initialization of variables containing userspace addresses" depends on GCC_PLUGINS + # Currently STRUCTLEAK inserts initialization out of live scope of + # variables from KASAN point of view. This leads to KASAN false + # positive reports. Prohibit this combination for now. + depends on !KASAN
KASAN_EXTRA
Quoted 4 lines · Andrey Ryabinin
On 04/19/2018 12:48 PM, Dmitry Vyukov wrote:
Quoted 11 lines
arch/Kconfig config GCC_PLUGIN_LATENT_ENTROPY · line 470
Quoted 10 lines
arch/Kconfig +4
-0@@ -464,6 +464,10 @@ config GCC_PLUGIN_LATENT_ENTROPY config GCC_PLUGIN_STRUCTLEAK bool "Force initialization of variables containing userspace addresses" depends on GCC_PLUGINS + # Currently STRUCTLEAK inserts initialization out of live scope of + # variables from KASAN point of view. This leads to KASAN false + # positive reports. Prohibit this combination for now. + depends on !KASAN
KASAN_EXTRA
Remailed, thanks.