Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master commit 1f58f7f6dd66f8a5d3f5eed16bb9bb9dd47b0b8f Author: Patricia Alfonso AuthorDate: Fri Sep 25 14:50:16 2020 +1000 Commit: Stephen Rothwell CommitDate: Fri Sep 25 14:50:16 2020 +1000 KASAN: Port KASAN Tests to KUnit Transfer all previous tests for KASAN to KUnit so they can be run more easily. Using kunit_tool, developers can run these tests with their other KUnit tests and see "pass" or "fail" with the appropriate KASAN report instead of needing to parse each KASAN report to test KASAN functionalities. All KASAN reports are still printed to dmesg. Stack tests do not work properly when KASAN_STACK is enabled so those tests use a check for "if IS_ENABLED(CONFIG_KASAN_STACK)" so they only run if stack instrumentation is enabled. If KASAN_STACK is not enabled, KUnit will print a statement to let the user know this test was not run with KASAN_STACK enabled. copy_user_test and kasan_rcu_uaf cannot be run in KUnit so there is a separate test file for those tests, which can be run as before as a module. Link: https://lkml.kernel.org/r/20200910070331.3358048-4-davidgow@google.com Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Brendan Higgins Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Tested-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Ingo Molnar Cc: Juri Lelli Cc: Peter Zijlstra Cc: Shuah Khan Cc: Vincent Guittot Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell b23647e6de KUnit: KASAN Integration 1f58f7f6dd KASAN: Port KASAN Tests to KUnit +----------------------------------------------------------+------------+------------+ | | b23647e6de | 1f58f7f6dd | +----------------------------------------------------------+------------+------------+ | boot_successes | 37 | 0 | | boot_failures | 3 | 15 | | WARNING:at_kernel/rcu/rcutorture.c:#rcu_torture_fwd_prog | 2 | | | RIP:rcu_torture_fwd_prog | 2 | | | BUG:kernel_hang_in_boot_stage | 1 | | | BUG:KASAN:slab-out-of-bounds_in_k | 0 | 15 | | BUG:KASAN:use-after-free_in_k | 0 | 15 | | BUG:KASAN:double-free_or_invalid-free_in_k | 0 | 15 | | BUG:KASAN:out-of-bounds_in_k | 0 | 15 | | BUG:KASAN:global-out-of-bounds_in_k | 0 | 15 | | BUG:KASAN:stack-out-of-bounds_in_k | 0 | 15 | | BUG:KASAN:alloca-out-of-bounds_in_k | 0 | 15 | | BUG:KASAN:vmalloc-out-of-bounds_in_v | 0 | 15 | +----------------------------------------------------------+------------+------------+ If you fix the issue, kindly add following tag Reported-by: kernel test robot [ 23.786911] Key type big_key registered [ 23.797562] Key type encrypted registered [ 23.798770] # Subtest: kasan [ 23.798774] 1..36 [ 23.799605] ================================================================== [ 23.801318] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_right+0x24f/0x270 [ 23.802540] Write of size 1 at addr ffff8881e3d75e7b by task kunit_try_catch/193 [ 23.803856] [ 23.804143] CPU: 0 PID: 193 Comm: kunit_try_catch Not tainted 5.9.0-rc6-00411-g1f58f7f6dd66f #1 [ 23.805732] Call Trace: [ 23.806192] print_address_description+0x1e/0x210 [ 23.811296] ? kmsg_dump_rewind_nolock+0xd4/0xd4 [ 23.812135] ? kmalloc_oob_right+0x24f/0x270 [ 23.812911] kasan_report.cold+0x37/0x7c [ 23.813598] ? kmalloc_oob_right+0x24f/0x270 [ 23.814391] kmalloc_oob_right+0x24f/0x270 [ 23.815142] ? kmalloc_oob_left+0x2b0/0x2b0 [ 23.815889] ? kunit_binary_str_assert_format+0x200/0x200 [ 23.816833] ? __kthread_parkme+0x65/0x1a0 [ 23.817564] ? lock_downgrade+0x730/0x730 [ 23.818281] ? print_unlock_imbalance_bug+0x70/0x70 [ 23.819163] ? __sched_text_start+0x8/0x8 [ 23.819882] kunit_try_run_case+0x105/0x190 [ 23.820619] ? kunit_catch_run_case+0xf0/0xf0 [ 23.821387] kunit_generic_run_threadfn_adapter+0x48/0x90 [ 23.822341] ? kunit_try_catch_throw+0x70/0x70 [ 23.823146] kthread+0x36c/0x440 [ 23.823724] ? kthread_create_worker_on_cpu+0xa0/0xa0 [ 23.824603] ret_from_fork+0x22/0x30 [ 23.825241] [ 23.825524] Allocated by task 193: [ 23.826125] kasan_save_stack+0x1b/0x40 [ 23.826829] __kasan_kmalloc+0xc1/0xd0 [ 23.827662] kmalloc_oob_right+0x98/0x270 [ 23.828389] kunit_try_run_case+0x105/0x190 [ 23.829144] kunit_generic_run_threadfn_adapter+0x48/0x90 [ 23.830082] kthread+0x36c/0x440 [ 23.830675] ret_from_fork+0x22/0x30 [ 23.831316] [ 23.831624] The buggy address belongs to the object at ffff8881e3d75e00 [ 23.831624] which belongs to the cache kmalloc-128 of size 128 [ 23.833883] The buggy address is located 123 bytes inside of [ 23.833883] 128-byte region [ffff8881e3d75e00, ffff8881e3d75e80) # HH:MM RESULT GOOD BAD GOOD_BUT_DIRTY DIRTY_NOT_BAD git bisect start 20dc779fdefc40bf7dd9736cea01704f29228fae v5.8 -- git bisect good 3e8d3bdc2a757cc6be5470297947799a7df445cc # 02:38 G 10 0 0 1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net git bisect good b0b7c9722d10c992fcf583f3fa79a1564f47bc44 # 02:54 G 10 0 0 0 Merge remote-tracking branch 'drivers-memory/for-next' into master git bisect good 9d729b412d80bdc7d6f55a539dce67a9ea004857 # 03:17 G 10 0 0 0 Merge remote-tracking branch 'drm/drm-next' into master git bisect good e7a9c3252e8b4e23f832264cf1bfed5850d34ad1 # 03:38 G 10 0 1 1 Merge remote-tracking branch 'leds/for-next' into master git bisect good f31d9a8e2ef89618409bd238bc3e0fc3a0a6320f # 03:54 G 10 0 0 0 Merge remote-tracking branch 'livepatching/for-next' into master git bisect good 4e2f979ad8084a32b63cf68901590bbdd796dc50 # 04:19 G 10 0 1 1 Merge remote-tracking branch 'hyperv/hyperv-next' into master git bisect good 497520917250c674aaa2cbce1ff28a93c7463f32 # 04:39 G 10 0 1 1 Merge remote-tracking branch 'notifications/notifications-pipe-core' into master git bisect good 136c9880a4b48c258dad9bc32d5c1c6b8f027a43 # 05:06 G 10 0 0 0 Revert "x86/uaccess: Use pointer masking to limit uaccess speculation" git bisect bad ebf18610b8fcacb3bb5c147e4256d05711c55bf2 # 05:23 B 0 1 10 0 Merge branch 'akpm-current/current' into master git bisect bad 0953a6483c1068105cfe6ea6350fe1d06e23f4d5 # 05:56 B 0 1 10 0 mm/hugetlb: count file_region to be added when regions_needed != NULL git bisect good 87c9a81ef194b16af39316caebf0a3b375909f52 # 06:38 G 10 0 1 1 mm: optimise madvise WILLNEED git bisect good 0ac7d0996fb6163a50e72f815f67f4e1869cec54 # 07:09 G 10 0 1 1 mm: simplify PageDoubleMap with PF_SECOND policy git bisect bad 3f7bffacc7b1b3edfab54045d9aa0d07bf809832 # 07:25 B 0 1 10 0 mm/page_alloc: tweak comments in has_unmovable_pages() git bisect good 2c54afe614694bc371bc3ae76849ab9f19cfd969 # 07:58 G 10 0 0 0 mm/dmapool.c: replace open-coded list_for_each_entry_safe() git bisect good 4cf6915570794c877da0fb272d344c4d8e4392ef # 08:38 G 10 0 1 1 kasan/kunit: add KUnit Struct to Current Task git bisect bad 8dc4b11678b8f91ebac382c52702f50aa3f2792a # 08:55 B 0 1 11 1 kasan-port-kasan-tests-to-kunit-v14 git bisect bad 1f58f7f6dd66f8a5d3f5eed16bb9bb9dd47b0b8f # 09:19 B 0 1 10 0 KASAN: Port KASAN Tests to KUnit git bisect good b23647e6de28f17558a69c9aa6afe69ad8ca3835 # 09:58 G 10 0 1 1 KUnit: KASAN Integration # first bad commit: [1f58f7f6dd66f8a5d3f5eed16bb9bb9dd47b0b8f] KASAN: Port KASAN Tests to KUnit git bisect good b23647e6de28f17558a69c9aa6afe69ad8ca3835 # 10:21 G 30 0 1 2 KUnit: KASAN Integration # extra tests with debug options git bisect bad 1f58f7f6dd66f8a5d3f5eed16bb9bb9dd47b0b8f # 10:43 B 0 1 10 0 KASAN: Port KASAN Tests to KUnit --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/lkp@lists.01.org