bisecting fixing commit since 27ce4f2a6817e38ca74c643d47a96359f6cc0c1c building syzkaller on 1bf9a662c66aa432ff2fe3bf2562578cef626c09 testing commit 27ce4f2a6817e38ca74c643d47a96359f6cc0c1c with gcc (GCC) 8.1.0 kernel signature: 95f6c03c1d18399056adefea0001d9dc34c53a752aafdea713295e9b3d47a6ae run #0: crashed: KASAN: use-after-free Read in lbmIODone run #1: crashed: KASAN: use-after-free Read in lbmIODone run #2: crashed: KASAN: use-after-free Read in lbmIODone run #3: crashed: KASAN: use-after-free Read in lbmIODone run #4: crashed: KASAN: use-after-free Read in lbmIODone run #5: crashed: KASAN: use-after-free Read in lbmIODone run #6: crashed: KASAN: use-after-free Read in lbmIODone run #7: crashed: KASAN: use-after-free Read in lbmIODone run #8: OK run #9: OK testing current HEAD f79dc86058bc0c8317eea2a0f968382c6ffb0cfb testing commit f79dc86058bc0c8317eea2a0f968382c6ffb0cfb with gcc (GCC) 8.1.0 kernel signature: bee70b7b3f50b747681d2d66068b3996f0ee38a2c826e254d870fef7a424835f all runs: crashed: KASAN: use-after-free Read in lbmIODone revisions tested: 2, total time: 34m4.365259934s (build: 17m9.515852382s, test: 16m19.630358659s) the crash still happens on HEAD commit msg: Linux 4.14.215 crash: KASAN: use-after-free Read in lbmIODone ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cea/0x42d0 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff8881e009e468 by task loop4/11739 CPU: 1 PID: 11739 Comm: loop4 Not tainted 4.14.215-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x14b/0x1f1 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d4 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __lock_acquire+0x2cea/0x42d0 kernel/locking/lockdep.c:3369 lock_acquire+0x17e/0x3e0 kernel/locking/lockdep.c:3998 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:160 __wake_up_common_lock+0xb2/0x170 kernel/sched/wait.c:124 __wake_up+0xe/0x10 kernel/sched/wait.c:149 lbmIODone+0x2e7/0xda0 fs/jfs/jfs_logmgr.c:2307 bio_endio.part.11+0x23f/0x5d0 block/bio.c:1918 bio_endio+0x9/0x10 block/bio.c:1888 req_bio_endio block/blk-core.c:204 [inline] blk_update_request+0x284/0x9b0 block/blk-core.c:2765 blk_mq_end_request+0x49/0x1b0 block/blk-mq.c:530 lo_complete_rq+0xab/0x1c0 drivers/block/loop.c:465 __blk_mq_complete_request+0x2c6/0x640 block/blk-mq.c:571 blk_mq_complete_request+0x44/0x50 block/blk-mq.c:591 loop_handle_cmd drivers/block/loop.c:1784 [inline] loop_queue_work+0x248/0x214f drivers/block/loop.c:1793 kthread_worker_fn+0x270/0x6c0 kernel/kthread.c:642 loop_kthread_worker_fn+0x4c/0x60 drivers/block/loop.c:871 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 11728: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 kmem_cache_alloc_trace+0x152/0x3f0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] lbmLogInit fs/jfs/jfs_logmgr.c:1842 [inline] lmLogInit+0x3d4/0x14a0 fs/jfs/jfs_logmgr.c:1292 open_inline_log fs/jfs/jfs_logmgr.c:1197 [inline] lmLogOpen+0x853/0x1070 fs/jfs/jfs_logmgr.c:1090 jfs_mount_rw+0x23a/0x470 fs/jfs/jfs_mount.c:271 jfs_fill_super+0x7b3/0xaf0 fs/jfs/super.c:598 mount_bdev+0x26f/0x330 fs/super.c:1134 jfs_do_mount+0x10/0x20 fs/jfs/super.c:703 mount_fs+0x7f/0x269 fs/super.c:1237 vfs_kern_mount.part.9+0x58/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x352/0x2af0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xb1/0xd0 fs/namespace.c:3072 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 11728: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 lbmLogShutdown.isra.2+0x59/0x80 fs/jfs/jfs_logmgr.c:1885 lmLogInit+0xe0b/0x14a0 fs/jfs/jfs_logmgr.c:1437 open_inline_log fs/jfs/jfs_logmgr.c:1197 [inline] lmLogOpen+0x853/0x1070 fs/jfs/jfs_logmgr.c:1090 jfs_mount_rw+0x23a/0x470 fs/jfs/jfs_mount.c:271 jfs_fill_super+0x7b3/0xaf0 fs/jfs/super.c:598 mount_bdev+0x26f/0x330 fs/super.c:1134 jfs_do_mount+0x10/0x20 fs/jfs/super.c:703 mount_fs+0x7f/0x269 fs/super.c:1237 vfs_kern_mount.part.9+0x58/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x352/0x2af0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xb1/0xd0 fs/namespace.c:3072 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8881e009e400 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 104 bytes inside of 192-byte region [ffff8881e009e400, ffff8881e009e4c0) The buggy address belongs to the page: page:ffffea0007802780 count:1 mapcount:0 mapping:ffff8881e009e000 index:0xffff8881e009ee00 flags: 0x17ff00000000100(slab) raw: 017ff00000000100 ffff8881e009e000 ffff8881e009ee00 000000010000000f raw: ffffea000766c560 ffffea000759aea0 ffff8881f6000040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881e009e300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881e009e380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8881e009e400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881e009e480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881e009e500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================