bisecting fixing commit since 811218eceeaa7618652e1b8d11caeff67ab42072 building syzkaller on 14052202e8d8d0bb407512b6861e9085f9171241 testing commit 811218eceeaa7618652e1b8d11caeff67ab42072 with gcc (GCC) 8.4.1 20210217 kernel signature: b1e3efea9c52fd41d10845b8476dbef6c7925d80089819bed0969695da0fe8f5 all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries testing current HEAD 3c8c23092588a23bf1856a64f58c37f477a413be testing commit 3c8c23092588a23bf1856a64f58c37f477a413be with gcc (GCC) 8.4.1 20210217 kernel signature: 0cf9f51b051d38f4b9b05bdae58273fd4e0a9774a8a5abf6e74e65192f2c1953 all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries revisions tested: 2, total time: 24m52.429888429s (build: 17m45.417176744s, test: 6m41.536055434s) the crash still happens on HEAD commit msg: Linux 4.19.190 crash: KASAN: out-of-bounds Read in leaf_paste_entries REISERFS (device loop3): journal params: device loop3, size 15748, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop3): 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 ffff8880545e6fa4 by task syz-executor.3/9981 CPU: 0 PID: 9981 Comm: syz-executor.3 Not tainted 4.19.190-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:2148 reiserfs_add_entry+0x792/0xb50 fs/reiserfs/namei.c:566 REISERFS (device loop5): Using tea hash to sort names 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+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+0xb1/0xd0 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: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:00007f4d0a5befa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00000000004672ba RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f4d0a5bf000 RBP: 00007f4d0a5bf040 R08: 00007f4d0a5bf040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f4d0a5bf000 R15: 00000000200003c0 The buggy address belongs to the page: page:ffffea0001517980 count:2 mapcount:0 mapping:ffff8880b1b334e0 index:0x3d97 kasan: CONFIG_KASAN_INLINE enabled flags: 0xfff00000001064(referenced|lru|active|private) raw: 00fff00000001064 ffffea0001515848 ffffea000151b908 ffff8880b1b334e0 raw: 0000000000003d97 ffff88805c6a7000 00000002ffffffff ffff88823b2d4900 kasan: GPF could be caused by NULL-ptr deref or user memory access page dumped because: kasan: bad access detected page->mem_cgroup:ffff88823b2d4900 Memory state around the buggy address: ffff8880545e6e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880545e6f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880545e6f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880545e7000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880545e7080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== kasan: CONFIG_KASAN_INLINE enabled BUG: unable to handle kernel paging request at 0000000100040048 ------------[ cut here ]------------ PGD 97784067 P4D 97784067 PUD 0 kasan: CONFIG_KASAN_INLINE enabled Oops: 0010 [#1] PREEMPT SMP KASAN kasan: GPF could be caused by NULL-ptr deref or user memory access CPU: 1 PID: 9887 Comm: loop0 Tainted: G B 4.19.190-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:0x100040048 Code: Bad RIP value. RSP: 0018:ffff88809da9fa88 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8880abaa0800 RCX: 0000000000000017 RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff88805c737498 RBP: ffff88809da9faa8 R08: ffffffff8aefc058 R09: 0000000000000004 R10: fffffbfff15df809 R11: 000000009ca55f61 R12: ffff88805c737498 kasan: CONFIG_KASAN_INLINE enabled R13: 0000000100040048 R14: ffff8880abaa0848 R15: ffff8880abaa0808 kasan: GPF could be caused by NULL-ptr deref or user memory access FS: 0000000000000000(0000) GS:ffff8880ba300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000010004001e CR3: 000000009a677000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bio_endio.part.11+0x336/0x620 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:3112 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/0x2040 drivers/block/loop.c:1940 kthread_worker_fn kernel/kthread.c:700 [inline] kthread_worker_fn+0x284/0x6d0 kernel/kthread.c:662 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: 0000000100040048 ---[ end trace 2ed91eee66cd6632 ]--- general protection fault: 0000 [#2] PREEMPT SMP KASAN RIP: 0010:0x100040048 CPU: 0 PID: 9927 Comm: loop2 Tainted: G B D 4.19.190-syzkaller #0 Code: Bad RIP value. Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RSP: 0018:ffff88809da9fa88 EFLAGS: 00010246 RIP: 0010:__read_once_size include/linux/compiler.h:261 [inline] RIP: 0010:compound_head include/linux/page-flags.h:142 [inline] RIP: 0010:find_get_entry+0x1c1/0x790 mm/filemap.c:1470 RAX: 0000000000000000 RBX: ffff8880abaa0800 RCX: 0000000000000017 RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff88805c737498 Code: 00 00 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 8d 43 08 48 ba 00 00 00 00 00 fc ff df 48 89 85 48 ff ff ff 48 c1 e8 03 <80> 3c 10 00 0f 85 f3 04 00 00 48 8b 43 08 be 04 00 00 00 4c 8d 78 RBP: ffff88809da9faa8 R08: ffffffff8aefc058 R09: 0000000000000004 RSP: 0018:ffff88808f3376d0 EFLAGS: 00010206 R10: fffffbfff15df809 R11: 000000009ca55f61 R12: ffff88805c737498 RAX: 000000002000800a RBX: 0000000100040048 RCX: dffffc0000000000 R13: 0000000100040048 R14: ffff8880abaa0848 R15: ffff8880abaa0808 RDX: dffffc0000000000 RSI: 00000000000039be RDI: ffffffff89e34600 FS: 0000000000000000(0000) GS:ffff8880ba300000(0000) knlGS:0000000000000000 RBP: ffff88808f337790 R08: ffff8880a4bc5840 R09: ffff8880a4bc5880 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 R10: ffff88808f337678 R11: 0000000000000040 R12: dffffc0000000000 CR2: 000000010004001e CR3: 000000009a677000 CR4: 00000000001406e0 R13: ffff88805c6b9a70 R14: ffff88808f337768 R15: dffffc0000000000 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8880ba200000(0000) knlGS:0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033