bisecting fixing commit since 811218eceeaa7618652e1b8d11caeff67ab42072 building syzkaller on 14052202e8d8d0bb407512b6861e9085f9171241 testing commit 811218eceeaa7618652e1b8d11caeff67ab42072 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 0505d49a6522a94d1097d5ae277ac39584226b8d89f61eabe9037374e79e910f all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries testing current HEAD 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 testing commit 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 99d2d5386b86221aed3020fee1264dd8ac986e050819a04de84a34865e8e34b2 all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries revisions tested: 2, total time: 24m27.660530797s (build: 16m55.526468341s, test: 7m1.189163782s) the crash still happens on HEAD commit msg: Linux 4.19.204 crash: KASAN: out-of-bounds Read in leaf_paste_entries REISERFS (device loop2): checking transaction log (loop2) REISERFS (device loop0): checking transaction log (loop0) REISERFS (device loop4): checking transaction log (loop4) REISERFS (device loop5): Using tea hash to sort names ================================================================== BUG: KASAN: out-of-bounds in memmove include/linux/string.h:392 [inline] BUG: KASAN: out-of-bounds in leaf_paste_entries+0x3f9/0xa20 fs/reiserfs/lbalance.c:1378 Read of size 18446744073709551584 at addr ffff888056ba8fa4 by task syz-executor.5/9887 CPU: 1 PID: 9887 Comm: syz-executor.5 Not tainted 4.19.204-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 mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 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:392 [inline] leaf_paste_entries+0x3f9/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+0x4b6/0x1300 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+0x2690/0x6e20 fs/reiserfs/do_balan.c:1899 reiserfs_paste_into_item+0x509/0x630 fs/reiserfs/stree.c:2169 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+0x376/0x9f0 fs/reiserfs/xattr.c:1002 reiserfs_fill_super+0x1a88/0x2790 fs/reiserfs/super.c:2188 mount_bdev+0x26f/0x330 fs/super.c:1158 get_super_block+0x10/0x20 fs/reiserfs/super.c:2617 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:2483 [inline] do_mount+0x376/0x2630 fs/namespace.c:2813 ksys_mount+0xb1/0xd0 fs/namespace.c:3029 __do_sys_mount fs/namespace.c:3043 [inline] __se_sys_mount fs/namespace.c:3040 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3040 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4672ba Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f09f7badfa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00000000004672ba RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f09f7bae000 RBP: 00007f09f7bae040 R08: 00007f09f7bae040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f09f7bae000 R15: 00000000200003c0 The buggy address belongs to the page: page:ffffea00015aea00 count:2 mapcount:0 mapping:ffff88809070b660 index:0x3d97 flags: 0xfff00000001064(referenced|lru|active|private) raw: 00fff00000001064 ffffea0001590748 ffffea00015aea48 ffff88809070b660 raw: 0000000000003d97 ffff88805bd9fbd0 00000002ffffffff ffff88823b2d4900 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88823b2d4900 Memory state around the buggy address: ffff888056ba8e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888056ba8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888056ba8f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888056ba9000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888056ba9080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== REISERFS (device loop1): Using tea hash to sort names REISERFS (device loop3): Using tea hash to sort names kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access ------------[ cut here ]------------ kernel BUG at fs/buffer.c:3049! ------------[ cut here ]------------ kernel BUG at fs/buffer.c:3049! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 9978 Comm: syz-executor.2 Tainted: G B 4.19.204-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:submit_bh_wbc+0x4e5/0x6f0 fs/buffer.c:3049 Code: 33 45 89 65 10 4c 89 ef e8 18 20 92 01 31 c0 48 83 c4 20 5b 41 5c 41 5d 41 5e 41 5f 5d c3 f0 80 63 01 f7 e9 c1 fb ff ff 0f 0b <0f> 0b 0f 0b 0f 0b 0f 0b 0f 0b e8 2c 2b ea ff eb c6 e8 85 2a ea ff RSP: 0018:ffff8880897d7458 EFLAGS: 00010246 RAX: 000000010004004c RBX: ffff888050422a80 RCX: 0000000000000000 RDX: 1ffff1100a084550 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff8880897d74a0 R08: 0000000000000000 R09: ffffed100a08455c R10: ffffed100a08455c R11: ffff888050422ae3 R12: 0000000000000000 R13: ffff888050422a80 R14: ffff8880897d75d0 R15: 0000000000000000 FS: 00007fd5ef606700(0000) GS:ffff8880ba200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f560003b0d8 CR3: 00000000ab5df000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: submit_bh fs/buffer.c:3096 [inline] ll_rw_block+0x130/0x170 fs/buffer.c:3146 reiserfs_breada+0x17b/0x340 fs/reiserfs/journal.c:2355 journal_read fs/reiserfs/journal.c:2458 [inline] journal_init+0x20f1/0x65e0 fs/reiserfs/journal.c:2907 reiserfs_fill_super+0x930/0x2790 fs/reiserfs/super.c:2035 mount_bdev+0x26f/0x330 fs/super.c:1158 get_super_block+0x10/0x20 fs/reiserfs/super.c:2617 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:2483 [inline] do_mount+0x376/0x2630 fs/namespace.c:2813 ksys_mount+0xb1/0xd0 fs/namespace.c:3029 __do_sys_mount fs/namespace.c:3043 [inline] __se_sys_mount fs/namespace.c:3040 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3040 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4672ba Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd5ef605fa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00000000004672ba RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fd5ef606000 RBP: 00007fd5ef606040 R08: 00007fd5ef606040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007fd5ef606000 R15: 00000000200003c0 Modules linked in: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 7819 at fs/buffer.c:1976 __block_write_begin_int.cold.23+0x21/0x41 fs/buffer.c:1976