bisecting fixing commit since b09c34517e1ac4018e3bb75ed5c8610a8a1f486b building syzkaller on 1880b4a9f394370a7d1fcb5c1cfca0fa1127b463 testing commit b09c34517e1ac4018e3bb75ed5c8610a8a1f486b with gcc (GCC) 8.1.0 kernel signature: fc1d2188cdf449249f91cf7f8f0678c7149f11b7740425f9d1439f6639649e55 all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries testing current HEAD daefdc9eb24bfa11ab77a4b2a9c3923f1051fe0b testing commit daefdc9eb24bfa11ab77a4b2a9c3923f1051fe0b with gcc (GCC) 8.1.0 kernel signature: 37b6d356ac3a7af777c2d3a9b862383d4076d8aad55639403b1e9ee56aaf11d3 all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries revisions tested: 2, total time: 27m57.450446209s (build: 21m34.851231634s, test: 5m41.574716101s) the crash still happens on HEAD commit msg: Linux 4.19.161 crash: KASAN: out-of-bounds Read in leaf_paste_entries REISERFS (device loop4): Using r5 hash to sort names REISERFS (device loop4): using 3.5.x disk format REISERFS (device loop0): Using r5 hash to sort names REISERFS (device loop0): using 3.5.x disk format ================================================================== BUG: KASAN: out-of-bounds in memmove include/linux/string.h:388 [inline] BUG: KASAN: out-of-bounds in leaf_paste_entries+0x3f7/0xa20 fs/reiserfs/lbalance.c:1378 Read of size 18446744073709473760 at addr ffff88819acabfbf by task syz-executor.0/7425 CPU: 0 PID: 7425 Comm: syz-executor.0 Not tainted 4.19.161-syzkaller #0 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+0x17c/0x22a lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13c/0x1b0 mm/kasan/kasan.c:267 memmove+0x23/0x50 mm/kasan/kasan.c:293 memmove include/linux/string.h:388 [inline] leaf_paste_entries+0x3f7/0xa20 fs/reiserfs/lbalance.c:1378 balance_leaf_finish_node_paste_dirent fs/reiserfs/do_balan.c:1306 [inline] balance_leaf_finish_node_paste.isra.15+0x4af/0x12e0 fs/reiserfs/do_balan.c:1332 balance_leaf_finish_node fs/reiserfs/do_balan.c:1375 [inline] balance_leaf fs/reiserfs/do_balan.c:1463 [inline] do_balance+0x26d5/0x6d20 fs/reiserfs/do_balan.c:1899 reiserfs_paste_into_item+0x509/0x630 fs/reiserfs/stree.c:2142 reiserfs_add_entry+0x792/0xb50 fs/reiserfs/namei.c:566 reiserfs_mkdir+0x5a0/0x840 fs/reiserfs/namei.c:858 xattr_mkdir.constprop.6+0x91/0xc0 fs/reiserfs/xattr.c:76 create_privroot fs/reiserfs/xattr.c:880 [inline] reiserfs_xattr_init+0x399/0x845 fs/reiserfs/xattr.c:1002 reiserfs_fill_super+0x19ec/0x26b0 fs/reiserfs/super.c:2180 mount_bdev+0x26f/0x330 fs/super.c:1158 get_super_block+0x10/0x20 fs/reiserfs/super.c:2609 mount_fs+0x7f/0x2a2 fs/super.c:1261 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2469 [inline] do_mount+0x376/0x2710 fs/namespace.c:2799 ksys_mount+0xba/0xe0 fs/namespace.c:3015 __do_sys_mount fs/namespace.c:3029 [inline] __se_sys_mount fs/namespace.c:3026 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3026 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x46087a Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ad 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 8a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f1e052dea88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f1e052deb20 RCX: 000000000046087a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f1e052deae0 RBP: 00007f1e052deae0 R08: 00007f1e052deb20 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000140 R15: 0000000020000040 The buggy address belongs to the page: page:ffffea00066b2ac0 count:1 mapcount:0 mapping:ffff8881d4112d68 index:0x3164 flags: 0x17ffe000004003c(referenced|uptodate|dirty|lru|swapbacked) raw: 017ffe000004003c ffffea00066b2a88 ffffea00066b2b08 ffff8881d4112d68 raw: 0000000000003164 0000000000000000 00000001ffffffff ffff8881f5222a40 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8881f5222a40 Memory state around the buggy address: ffff88819acabe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88819acabf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88819acabf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88819acac000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88819acac080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 PGD 0 P4D 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 0 PID: 7353 Comm: loop3 Tainted: G B 4.19.161-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010: (null) Code: Bad RIP value. RSP: 0018:ffff8881d5b3fa88 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8881e9bc0340 RCX: 0000000000000017 RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff8881a5ba83f0 RBP: ffff8881d5b3faa8 R08: ffffffff89803018 R09: 0000000000000006 R10: fffffbfff1300601 R11: 0000000019e9d60f R12: ffff8881a5ba83f0 R13: 0000000000000000 R14: ffff8881e9bc0388 R15: ffff8881e9bc0348 FS: 0000000000000000(0000) GS:ffff8881f6600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000000866d001 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: end_bio_bh_io_sync+0xb7/0x100 fs/buffer.c:2976 bio_endio.part.11+0x330/0x610 block/bio.c:1780 bio_endio+0x9/0x10 block/bio.c:1747 req_bio_endio block/blk-core.c:278 [inline] blk_update_request+0x235/0x8f0 block/blk-core.c:3111 blk_mq_end_request+0x47/0x1f0 block/blk-mq.c:544 lo_complete_rq+0x1af/0x270 drivers/block/loop.c:487 __blk_mq_complete_request block/blk-mq.c:583 [inline] blk_mq_complete_request+0x36d/0x540 block/blk-mq.c:620 loop_handle_cmd drivers/block/loop.c:1931 [inline] loop_queue_work+0x224/0x2038 drivers/block/loop.c:1940 kthread_worker_fn+0x284/0x6d0 kernel/kthread.c:675 loop_kthread_worker_fn+0x4c/0x60 drivers/block/loop.c:923 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Modules linked in: CR2: 0000000000000000 ---[ end trace 4b919a7be0197bf5 ]--- BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: 0010: (null) PGD 0 P4D 0 Code: Bad RIP value. Oops: 0010 [#2] PREEMPT SMP KASAN RSP: 0018:ffff8881d5b3fa88 EFLAGS: 00010246 CPU: 1 PID: 7478 Comm: loop2 Tainted: G B D 4.19.161-syzkaller #0 RAX: 0000000000000000 RBX: ffff8881e9bc0340 RCX: 0000000000000017 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010: (null) RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff8881a5ba83f0 Code: Bad RIP value. RBP: ffff8881d5b3faa8 R08: ffffffff89803018 R09: 0000000000000006 RSP: 0018:ffff8881c41c7a88 EFLAGS: 00010246 R10: fffffbfff1300601 R11: 0000000019e9d60f R12: ffff8881a5ba83f0 RAX: 0000000000000000 RBX: ffff8881e9bc0200 RCX: 0000000000000017 R13: 0000000000000000 R14: ffff8881e9bc0388 R15: ffff8881e9bc0348 RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff8881a5bd73f0 FS: 0000000000000000(0000) GS:ffff8881f6600000(0000) knlGS:0000000000000000 RBP: ffff8881c41c7aa8 R08: ffffffff89803058 R09: 0000000000000004 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 R10: fffffbfff1300609 R11: 0000000019e9d60f R12: ffff8881a5bd73f0 CR2: ffffffffffffffd6 CR3: 000000000866d001 CR4: 00000000001606f0 R13: 0000000000000000 R14: ffff8881e9bc0248 R15: ffff8881e9bc0208 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8881f6700000(0000) knlGS:0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033