bisecting cause commit starting from 6d906f99817951e2257d577656899da02bb33105 building syzkaller on b0e8efcb4b0aac61f4647a76bbe54a5d38a370ba testing commit 6d906f99817951e2257d577656899da02bb33105 with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Read in refcount_sub_and_test_checked run #1: crashed: KASAN: use-after-free Read in refcount_sub_and_test_checked run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK testing release v5.0 testing commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 with gcc (GCC) 8.1.0 all runs: OK # git bisect start 6d906f99817951e2257d577656899da02bb33105 v5.0 Bisecting: 6921 revisions left to test after this (roughly 13 steps) [d72cb8c7d9dbd9ce820c80f3fddb56b296ba96fc] Merge tag 'riscv-for-linus-5.1-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux testing commit d72cb8c7d9dbd9ce820c80f3fddb56b296ba96fc with gcc (GCC) 8.1.0 all runs: OK # git bisect good d72cb8c7d9dbd9ce820c80f3fddb56b296ba96fc Bisecting: 3478 revisions left to test after this (roughly 12 steps) [b7a7d1c1ec688104fdc922568c26395a756f616d] Merge tag 'dma-mapping-5.1' of git://git.infradead.org/users/hch/dma-mapping testing commit b7a7d1c1ec688104fdc922568c26395a756f616d with gcc (GCC) 8.1.0 all runs: OK # git bisect good b7a7d1c1ec688104fdc922568c26395a756f616d Bisecting: 1738 revisions left to test after this (roughly 11 steps) [a9c55d58bc36b5a0ef7021772fc2508e693ed534] Merge tag 'powerpc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux testing commit a9c55d58bc36b5a0ef7021772fc2508e693ed534 with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Read in refcount_sub_and_test_checked run #1: crashed: KASAN: use-after-free Read in refcount_sub_and_test_checked run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad a9c55d58bc36b5a0ef7021772fc2508e693ed534 Bisecting: 874 revisions left to test after this (roughly 10 steps) [a5adcfcad55d5f034b33f79f1a873229d1e77b24] Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 testing commit a5adcfcad55d5f034b33f79f1a873229d1e77b24 with gcc (GCC) 8.1.0 all runs: OK # git bisect good a5adcfcad55d5f034b33f79f1a873229d1e77b24 Bisecting: 432 revisions left to test after this (roughly 9 steps) [f3ca4c55a6581c46e9f4a592dd698a7c67a713dd] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net testing commit f3ca4c55a6581c46e9f4a592dd698a7c67a713dd with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Read in refcount_sub_and_test_checked run #1: crashed: KASAN: use-after-free Read in refcount_sub_and_test_checked run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad f3ca4c55a6581c46e9f4a592dd698a7c67a713dd Bisecting: 174 revisions left to test after this (roughly 8 steps) [dc2535be1fd547fbd56aff091370280007b0a1af] Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux testing commit dc2535be1fd547fbd56aff091370280007b0a1af with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Read in refcount_sub_and_test_checked run #1: crashed: KASAN: use-after-free Read in refcount_sub_and_test_checked run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad dc2535be1fd547fbd56aff091370280007b0a1af Bisecting: 133 revisions left to test after this (roughly 7 steps) [75f486c015b51d00412f0671e3dfbb45b42f27ce] Merge branches 'clk-qcom-msm8998', 'clk-fractional-parent', 'clk-x86-mv' and 'clk-SA-fixes' into clk-next testing commit 75f486c015b51d00412f0671e3dfbb45b42f27ce with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Write in _free_event run #1: crashed: WARNING: ODEBUG bug in netdev_freemem run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad 75f486c015b51d00412f0671e3dfbb45b42f27ce Bisecting: 68 revisions left to test after this (roughly 6 steps) [3f8e7e7247e0627b4f1d758d793041fe3032b6e3] Merge branches 'clk-optional', 'clk-devm-clkdev-register', 'clk-allwinner', 'clk-meson' and 'clk-renesas' into clk-next testing commit 3f8e7e7247e0627b4f1d758d793041fe3032b6e3 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 3f8e7e7247e0627b4f1d758d793041fe3032b6e3 Bisecting: 27 revisions left to test after this (roughly 5 steps) [e7faa095cbd761ec9e0c0dd83a7425b19ddce510] Merge branches 'clk-imx', 'clk-samsung', 'clk-ti', 'clk-uniphier-gear' and 'clk-mmp2-lcdc' into clk-next testing commit e7faa095cbd761ec9e0c0dd83a7425b19ddce510 with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Write in _free_event run #1: crashed: KASAN: use-after-free Write in _free_event run #2: crashed: KASAN: use-after-free Write in _free_event run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad e7faa095cbd761ec9e0c0dd83a7425b19ddce510 Bisecting: 21 revisions left to test after this (roughly 4 steps) [0c91c11c7d62de9fea6f5520edb143a7199f3307] clk: imx8mq: add GPIO clocks to clock tree testing commit 0c91c11c7d62de9fea6f5520edb143a7199f3307 with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Write in _free_event run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad 0c91c11c7d62de9fea6f5520edb143a7199f3307 Bisecting: 9 revisions left to test after this (roughly 3 steps) [ba5625c3e272c77014687d44e12d2649eec4ddee] clk: imx: Add clock driver support for imx8mm testing commit ba5625c3e272c77014687d44e12d2649eec4ddee with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Write in _free_event run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad ba5625c3e272c77014687d44e12d2649eec4ddee Bisecting: 4 revisions left to test after this (roughly 2 steps) [cd67d3272768aa3f44c0f7cc71b82a112dce01fa] clk: imx: scu: add fallback compatible string support testing commit cd67d3272768aa3f44c0f7cc71b82a112dce01fa with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Write in _free_event run #1: crashed: KASAN: use-after-free Write in _free_event run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad cd67d3272768aa3f44c0f7cc71b82a112dce01fa Bisecting: 1 revision left to test after this (roughly 1 step) [470663e0781c06234235a025a5455c0e15925f0c] clk: imx: Make parents const pointer in mux wrappers testing commit 470663e0781c06234235a025a5455c0e15925f0c with gcc (GCC) 8.1.0 all runs: OK # git bisect good 470663e0781c06234235a025a5455c0e15925f0c Bisecting: 0 revisions left to test after this (roughly 0 steps) [402564aee071a9d1139bbca47f5a25242f215deb] clk: imx8mq: Make parent names arrays const pointers testing commit 402564aee071a9d1139bbca47f5a25242f215deb with gcc (GCC) 8.1.0 all runs: OK # git bisect good 402564aee071a9d1139bbca47f5a25242f215deb cd67d3272768aa3f44c0f7cc71b82a112dce01fa is the first bad commit commit cd67d3272768aa3f44c0f7cc71b82a112dce01fa Author: Aisheng Dong Date: Thu Jan 24 13:22:49 2019 +0000 clk: imx: scu: add fallback compatible string support SCU clock can be used in a similar way by IMX8QXP and IMX8QM SoCs. Make the driver support "fsl,scu-clk" fallback compatible string to allow other SoCs to reuse the common part. Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Stephen Boyd Cc: Michael Turquette Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd :040000 040000 a6826021d32eac3b61ad783e9e894ff968c4bee4 982bfcb25227a027bdc6207884e394c24c9cd813 M drivers revisions tested: 16, total time: 4h35m50.475099419s (build: 1h35m9.923112542s, test: 2h54m55.818616408s) first bad commit: cd67d3272768aa3f44c0f7cc71b82a112dce01fa clk: imx: scu: add fallback compatible string support cc: ["aisheng.dong@nxp.com" "fabio.estevam@nxp.com" "kernel@pengutronix.de" "mturquette@baylibre.com" "sboyd@kernel.org" "shawnguo@kernel.org"] crash: KASAN: use-after-free Write in _free_event team0 (unregistering): Port device team_slave_0 removed bond0 (unregistering): Releasing backup interface bond_slave_1 bond0 (unregistering): Releasing backup interface bond_slave_0 bond0 (unregistering): Released all slaves ================================================================== BUG: KASAN: use-after-free in atomic_dec_and_test include/asm-generic/atomic-instrumented.h:259 [inline] BUG: KASAN: use-after-free in put_task_struct include/linux/sched/task.h:97 [inline] BUG: KASAN: use-after-free in _free_event+0x361/0xf10 kernel/events/core.c:4452 Write of size 4 at addr ffff88808e2604a0 by task syz-executor.1/29320 CPU: 0 PID: 29320 Comm: syz-executor.1 Not tainted 5.0.0-rc6+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x113/0x167 lib/dump_stack.c:113 print_address_description.cold.5+0x9/0x1ff mm/kasan/report.c:187 kasan_report.cold.6+0x1b/0x39 mm/kasan/report.c:317 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/generic.c:191 kasan_check_write+0x14/0x20 mm/kasan/common.c:106 atomic_dec_and_test include/asm-generic/atomic-instrumented.h:259 [inline] put_task_struct include/linux/sched/task.h:97 [inline] _free_event+0x361/0xf10 kernel/events/core.c:4452 free_event+0x3c/0x90 kernel/events/core.c:4473 perf_event_release_kernel+0x4f3/0xb50 kernel/events/core.c:4634 perf_release+0x32/0x50 kernel/events/core.c:4648 __fput+0x24c/0x800 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x10e/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x1a9/0x200 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x40d/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4129e1 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 e4 1a 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffec46f63b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00000000004129e1 RDX: 0000000000000000 RSI: 0000000000000081 RDI: 0000000000000003 RBP: 0000000000741220 R08: 0000000000741218 R09: 000000000005dad3 R10: 00007ffec46f6470 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000001 R14: 0000000000000003 R15: 000000000073bfac Allocated by task 29322: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc.constprop.9+0xcb/0xd0 mm/kasan/common.c:496 kasan_kmalloc mm/kasan/common.c:504 [inline] kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:411 kmem_cache_alloc_node+0x147/0x730 mm/slab.c:3633 alloc_task_struct_node kernel/fork.c:158 [inline] dup_task_struct kernel/fork.c:845 [inline] copy_process.part.38+0x2dd2/0x7290 kernel/fork.c:1753 copy_process kernel/fork.c:1710 [inline] _do_fork+0x15d/0xbb0 kernel/fork.c:2227 __do_sys_clone kernel/fork.c:2334 [inline] __se_sys_clone kernel/fork.c:2328 [inline] __x64_sys_clone+0xba/0x140 kernel/fork.c:2328 do_syscall_64+0xd6/0x4e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 29322: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:458 kasan_slab_free+0xe/0x10 mm/kasan/common.c:466 __cache_free mm/slab.c:3487 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3749 free_task_struct kernel/fork.c:163 [inline] free_task+0xa5/0xd0 kernel/fork.c:458 copy_process.part.38+0x134f/0x7290 kernel/fork.c:2159 copy_process kernel/fork.c:1710 [inline] _do_fork+0x15d/0xbb0 kernel/fork.c:2227 __do_sys_clone kernel/fork.c:2334 [inline] __se_sys_clone kernel/fork.c:2328 [inline] __x64_sys_clone+0xba/0x140 kernel/fork.c:2328 do_syscall_64+0xd6/0x4e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808e260480 which belongs to the cache task_struct(49:syz1) of size 6016 The buggy address is located 32 bytes inside of 6016-byte region [ffff88808e260480, ffff88808e261c00) The buggy address belongs to the page: page:ffffea0002389800 count:1 mapcount:0 mapping:ffff888090d38040 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000234fc08 ffff8880a9676548 ffff888090d38040 raw: 0000000000000000 ffff88808e260480 0000000100000001 ffff8880a8550a80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880a8550a80 Memory state around the buggy address: ffff88808e260380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808e260400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808e260480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808e260500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808e260580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================