bisecting fixing commit since 13d2ce42de8cb98ff952f8de6307f896203854c2 building syzkaller on 04201c0669446145fd9c347c5538da0ca13ff29b testing commit 13d2ce42de8cb98ff952f8de6307f896203854c2 with gcc (GCC) 8.1.0 kernel signature: c57e237a29cea956663529807c716c6a085b7219e6cd759e53335b43da90e3be all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries testing current HEAD 43d555d83c3f1fb8168367ca5b47c3a6570ca487 testing commit 43d555d83c3f1fb8168367ca5b47c3a6570ca487 with gcc (GCC) 8.1.0 kernel signature: f69815cb4059b85569de5022020bdf677aa5e0ac2230f27618bd08b79bbc7904 all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries revisions tested: 2, total time: 22m59.999313808s (build: 16m39.199838944s, test: 5m52.04447775s) the crash still happens on HEAD commit msg: Linux 4.19.169 crash: KASAN: out-of-bounds Read in leaf_paste_entries REISERFS (device loop0): journal params: device loop0, size 8192, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop0): checking transaction log (loop0) REISERFS (device loop5): checking transaction log (loop5) REISERFS (device loop4): Using rupasov hash to sort names ================================================================== BUG: KASAN: out-of-bounds in memmove include/linux/string.h:388 [inline] BUG: KASAN: out-of-bounds in leaf_paste_entries+0x3bd/0xa20 fs/reiserfs/lbalance.c:1369 Read of size 18446744073709551571 at addr ffff88806d077fe1 by task syz-executor.4/9929 CPU: 0 PID: 9929 Comm: syz-executor.4 Not tainted 4.19.169-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/0x226 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/0x2fe 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+0x3bd/0xa20 fs/reiserfs/lbalance.c:1369 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:2148 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/0x850 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/0x2b0 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:0x460b9a 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:00007ffb57b01a78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffb57b01b10 RCX: 0000000000460b9a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffb57b01ad0 RBP: 00007ffb57b01ad0 R08: 00007ffb57b01b10 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020011200 The buggy address belongs to the page: page:ffffea0001b41dc0 count:2 mapcount:0 mapping:ffff8880ae23a520 index:0x2013 flags: 0xfff00000001064(referenced|lru|active|private) raw: 00fff00000001064 ffffea0001b5f808 ffffea0001b44bc8 ffff8880ae23a520 raw: 0000000000002013 ffff8880719a8150 00000002ffffffff ffff8880b593c980 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880b593c980 Memory state around the buggy address: ffff88806d077e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806d077f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806d077f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806d078000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806d078080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== REISERFS (device loop3): Using rupasov hash to sort names REISERFS (device loop0): Using rupasov hash to sort names REISERFS (device loop1): Using rupasov hash to sort names REISERFS (device loop2): Using rupasov hash to sort names kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access ------------[ cut here ]------------ general protection fault: 0000 [#1] PREEMPT SMP KASAN VFS: brelse: Trying to free free buffer CPU: 0 PID: 10014 Comm: loop5 Tainted: G B 4.19.169-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__read_once_size include/linux/compiler.h:207 [inline] RIP: 0010:radix_tree_load_root lib/radix-tree.c:603 [inline] RIP: 0010:__radix_tree_lookup+0x35/0x330 lib/radix-tree.c:1040 Code: 48 89 e5 41 57 4d 89 cf 41 bb 40 00 00 00 41 56 49 c1 ef 03 49 be 00 00 00 00 00 fc ff df 41 55 4d 01 f7 41 54 53 48 83 ec 30 <41> 80 3f 00 0f 85 2a 02 00 00 49 8b 58 40 48 89 d8 83 e0 03 48 83 WARNING: CPU: 1 PID: 7808 at fs/buffer.c:1144 __brelse+0x56/0x80 fs/buffer.c:1144 RSP: 0018:ffff888096a07528 EFLAGS: 00010286