Skip to content

Commit c9cf87e

Browse files
dvyukovtorvalds
authored andcommitted
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. Link: http://lkml.kernel.org/r/20180419172451.104700-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov <dvyukov@google.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Fengguang Wu <fengguang.wu@intel.com> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Dennis Zhou <dennisszhou@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1d1c8e5 commit c9cf87e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/Kconfig‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,10 @@ config GCC_PLUGIN_LATENT_ENTROPY
464464
config GCC_PLUGIN_STRUCTLEAK
465465
bool "Force initialization of variables containing userspace addresses"
466466
depends on GCC_PLUGINS
467+
# Currently STRUCTLEAK inserts initialization out of live scope of
468+
# variables from KASAN point of view. This leads to KASAN false
469+
# positive reports. Prohibit this combination for now.
470+
depends on !KASAN_EXTRA
467471
help
468472
This plugin zero-initializes any structures containing a
469473
__user attribute. This can prevent some classes of information

0 commit comments

Comments
 (0)