bisecting fixing commit since 2585cf9dfaaddf00b069673f27bb3f8530e2039c building syzkaller on 49ca1f59e37fcf63dc38a6bd2b60fcc47a0a708e testing commit 2585cf9dfaaddf00b069673f27bb3f8530e2039c compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: d14e051b79c0ebd22b2075079ff1653cd09b2900c63a31685c4c2130c5b19ee8 all runs: crashed: KASAN: out-of-bounds Read in leaf_paste_entries testing current HEAD e8a4e1c1bb697b1d9fc48f0e56dc0f50bc024bee testing commit e8a4e1c1bb697b1d9fc48f0e56dc0f50bc024bee compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 9d55eaaaf1d22fa63132ae682d9c5c05a3e970652baaa5a0a5e3971200dbf7a6 run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: failed to write control pipe: write |NUM: broken pipe run #1: crashed: KASAN: out-of-bounds Read in leaf_paste_entries run #2: crashed: KASAN: out-of-bounds Read in leaf_paste_entries run #3: crashed: KASAN: out-of-bounds Read in leaf_paste_entries run #4: crashed: KASAN: out-of-bounds Read in leaf_paste_entries run #5: crashed: KASAN: out-of-bounds Read in leaf_paste_entries run #6: crashed: KASAN: out-of-bounds Read in leaf_paste_entries run #7: crashed: KASAN: out-of-bounds Read in leaf_paste_entries run #8: crashed: KASAN: out-of-bounds Read in leaf_paste_entries run #9: crashed: KASAN: out-of-bounds Read in leaf_paste_entries revisions tested: 2, total time: 21m20.659209716s (build: 13m5.930186576s, test: 7m22.569452582s) the crash still happens on HEAD commit msg: Merge tag 'loongarch-fixes-5.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson crash: KASAN: out-of-bounds Read in leaf_paste_entries REISERFS (device loop0): journal params: device loop0, size 15748, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 REISERFS (device loop0): checking transaction log (loop0) REISERFS (device loop0): Using tea hash to sort names ================================================================== BUG: KASAN: out-of-bounds in leaf_paste_entries+0x405/0xa10 fs/reiserfs/lbalance.c:1377 Read of size 18446744073709551584 at addr ffff88806499cfa4 by task syz-executor.0/4096 CPU: 1 PID: 4096 Comm: syz-executor.0 Not tainted 5.19.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x467 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memmove+0x20/0x60 mm/kasan/shadow.c:54 leaf_paste_entries+0x405/0xa10 fs/reiserfs/lbalance.c:1377 balance_leaf_finish_node_paste_dirent fs/reiserfs/do_balan.c:1295 [inline] balance_leaf_finish_node_paste fs/reiserfs/do_balan.c:1321 [inline] balance_leaf_finish_node fs/reiserfs/do_balan.c:1364 [inline] balance_leaf+0x90cc/0xdb90 fs/reiserfs/do_balan.c:1452 do_balance+0x2ee/0x760 fs/reiserfs/do_balan.c:1888 reiserfs_paste_into_item+0x63c/0x7b0 fs/reiserfs/stree.c:2159 reiserfs_add_entry+0x7fb/0xc50 fs/reiserfs/namei.c:567 reiserfs_mkdir+0x5a3/0x860 fs/reiserfs/namei.c:860 xattr_mkdir fs/reiserfs/xattr.c:76 [inline] create_privroot fs/reiserfs/xattr.c:889 [inline] reiserfs_xattr_init+0x49d/0xb20 fs/reiserfs/xattr.c:1012 reiserfs_fill_super+0x1c78/0x27a0 fs/reiserfs/super.c:2177 mount_bdev+0x2cb/0x3b0 fs/super.c:1367 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1497 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x7e8/0x1a40 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fc6af88a3ca 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:00007fc6b0a9ef88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007fc6af88a3ca RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fc6b0a9efe0 RBP: 00007fc6b0a9f020 R08: 00007fc6b0a9f020 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007fc6b0a9efe0 R15: 00000000200003c0 The buggy address belongs to the physical page: page:ffffea0001926700 refcount:3 mapcount:0 mapping:ffff8881404b4ab8 index:0x3d97 pfn:0x6499c memcg:ffff88807d55c000 aops:def_blk_aops ino:700000 flags: 0xfff00000002022(referenced|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002022 0000000000000000 dead000000000122 ffff8881404b4ab8 raw: 0000000000003d97 ffff88806aa29910 00000003ffffffff ffff88807d55c000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x148c48(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 4096, tgid 4095 (syz-executor.0), ts 85202022450, free_ts 9375935418 prep_new_page mm/page_alloc.c:2456 [inline] get_page_from_freelist+0x19d3/0x3b30 mm/page_alloc.c:4198 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5426 folio_alloc+0x12/0x40 mm/mempolicy.c:2282 filemap_alloc_folio mm/filemap.c:996 [inline] __filemap_get_folio+0x3c3/0x9e0 mm/filemap.c:1992 pagecache_get_page+0x10/0x1a0 mm/folio-compat.c:126 find_or_create_page include/linux/pagemap.h:615 [inline] grow_dev_page fs/buffer.c:946 [inline] grow_buffers fs/buffer.c:1011 [inline] __getblk_slow+0x185/0xc60 fs/buffer.c:1038 sb_getblk include/linux/buffer_head.h:326 [inline] search_by_key+0x35c/0x4380 fs/reiserfs/stree.c:672 reiserfs_read_locked_inode+0x144/0x21c0 fs/reiserfs/inode.c:1557 reiserfs_fill_super+0x12e7/0x27a0 fs/reiserfs/super.c:2073 mount_bdev+0x2cb/0x3b0 fs/super.c:1367 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1497 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x7e8/0x1a40 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1371 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1421 free_unref_page_prepare mm/page_alloc.c:3343 [inline] free_unref_page+0x19/0x6a0 mm/page_alloc.c:3438 free_contig_range+0xb1/0x180 mm/page_alloc.c:9314 destroy_args+0x7e/0x503 mm/debug_vm_pgtable.c:1031 debug_vm_pgtable+0x1f48/0x1fcc mm/debug_vm_pgtable.c:1354 do_one_initcall+0xbe/0x440 init/main.c:1295 do_initcall_level init/main.c:1368 [inline] do_initcalls init/main.c:1384 [inline] do_basic_setup init/main.c:1403 [inline] kernel_init_freeable+0x5ab/0x605 init/main.c:1610 kernel_init+0x14/0x130 init/main.c:1499 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 Memory state around the buggy address: ffff88806499ce80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806499cf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806499cf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806499d000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806499d080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================