ci2 starts bisection 2023-04-24 12:02:39.058944319 +0000 UTC m=+673.011253707 bisecting fixing commit since 1e760fa3596e8c7f08412712c168288b79670d78 building syzkaller on 9700afae0a79ffbe2070dec1a857a60356157e85 ensuring issue is reproducible on original commit 1e760fa3596e8c7f08412712c168288b79670d78 testing commit 1e760fa3596e8c7f08412712c168288b79670d78 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 42ec372cd1d10a417ab2c9daf16037a99fcac23dee7528ae6f00096af1848882 run #0: crashed: KASAN: out-of-bounds Read in reiserfs_get_unused_objectid run #1: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #2: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #3: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #4: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #5: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #6: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #7: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #8: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #9: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #10: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #11: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #12: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #13: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #14: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #15: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #16: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #17: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #18: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #19: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid testing current HEAD 457391b0380335d5e9a5babdec90ac53928b23b4 testing commit 457391b0380335d5e9a5babdec90ac53928b23b4 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: aca70aeab61647ab47790906410b1a580bc39ea920104c84a9fdc293a6ca7ef4 run #0: crashed: fatal error: fault run #1: crashed: fatal error: fault run #2: crashed: fatal error: fault run #3: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #4: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #5: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #6: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #7: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #8: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid run #9: crashed: KASAN: use-after-free Read in reiserfs_get_unused_objectid revisions tested: 2, total time: 52m23.485175146s (build: 38m44.163002232s, test: 6m20.541119322s) the crash still happens on HEAD commit msg: Linux 6.3 crash: KASAN: use-after-free Read in reiserfs_get_unused_objectid REISERFS (device loop0): journal params: device loop0, size 512, 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 loop0): Using r5 hash to sort names ================================================================== BUG: KASAN: use-after-free in reiserfs_get_unused_objectid+0x1e7/0x3f0 fs/reiserfs/objectid.c:87 Read of size 250888 at addr ffff888072733058 by task syz-executor.0/5423 CPU: 1 PID: 5423 Comm: syz-executor.0 Not tainted 6.3.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x167/0x220 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x163/0x540 mm/kasan/report.c:430 kasan_report+0x176/0x1b0 mm/kasan/report.c:536 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187 __asan_memmove+0x29/0x70 mm/kasan/shadow.c:94 reiserfs_get_unused_objectid+0x1e7/0x3f0 fs/reiserfs/objectid.c:87 reiserfs_new_inode+0x298/0x1a90 fs/reiserfs/inode.c:1944 reiserfs_mkdir+0x543/0x870 fs/reiserfs/namei.c:845 xattr_mkdir fs/reiserfs/xattr.c:76 [inline] create_privroot fs/reiserfs/xattr.c:882 [inline] reiserfs_xattr_init+0x291/0x600 fs/reiserfs/xattr.c:1005 reiserfs_fill_super+0x1b9a/0x2070 fs/reiserfs/super.c:2175 mount_bdev+0x27f/0x370 fs/super.c:1380 legacy_get_tree+0xe9/0x170 fs/fs_context.c:610 vfs_get_tree+0x7f/0x220 fs/super.c:1510 do_new_mount+0x1e5/0x940 fs/namespace.c:3042 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount+0x232/0x2c0 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6e2888d62a Code: 48 c7 c2 b8 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6e29536f88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000001138 RCX: 00007f6e2888d62a RDX: 0000000020000080 RSI: 0000000020000040 RDI: 00007f6e29536fe0 RBP: 00007f6e29537020 R08: 00007f6e29537020 R09: 0000000000008008 R10: 0000000000008008 R11: 0000000000000246 R12: 0000000020000080 R13: 0000000020000040 R14: 00007f6e29536fe0 R15: 00000000200000c0 The buggy address belongs to the physical page: page:ffffea0001c9ccc0 refcount:2 mapcount:0 mapping:ffff88801a48a8f8 index:0x10 pfn:0x72733 memcg:ffff88807c71c000 aops:def_blk_aops ino:700000 flags: 0xfff00000002032(referenced|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002032 ffffea0001cee448 ffffea0001ceb9c8 ffff88801a48a8f8 raw: 0000000000000010 ffff888074106488 00000002ffffffff ffff88807c71c000 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 5423, tgid 5422 (syz-executor.0), ts 73308655898, free_ts 73292099122 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x3246/0x33c0 mm/page_alloc.c:4326 __alloc_pages+0x255/0x670 mm/page_alloc.c:5592 folio_alloc+0x13/0x30 mm/mempolicy.c:2287 filemap_alloc_folio+0xc6/0x3e0 mm/filemap.c:976 __filemap_get_folio+0x485/0x8d0 mm/filemap.c:1970 pagecache_get_page+0x13/0x160 mm/folio-compat.c:99 find_or_create_page include/linux/pagemap.h:632 [inline] grow_dev_page fs/buffer.c:989 [inline] grow_buffers fs/buffer.c:1054 [inline] __getblk_slow fs/buffer.c:1081 [inline] __getblk_gfp+0x1bf/0x780 fs/buffer.c:1376 __bread_gfp+0xe/0x220 fs/buffer.c:1410 sb_bread include/linux/buffer_head.h:341 [inline] read_super_block+0x84/0x700 fs/reiserfs/super.c:1604 reiserfs_fill_super+0xa22/0x2070 fs/reiserfs/super.c:1966 mount_bdev+0x27f/0x370 fs/super.c:1380 legacy_get_tree+0xe9/0x170 fs/fs_context.c:610 vfs_get_tree+0x7f/0x220 fs/super.c:1510 do_new_mount+0x1e5/0x940 fs/namespace.c:3042 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount+0x232/0x2c0 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1454 [inline] free_pcp_prepare mm/page_alloc.c:1504 [inline] free_unref_page_prepare+0xe2f/0xe70 mm/page_alloc.c:3388 free_unref_page_list+0x596/0x830 mm/page_alloc.c:3529 release_pages+0x1a0f/0x1bc0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:97 [inline] tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu+0xe9/0x1e0 mm/mmu_gather.c:299 tlb_finish_mmu+0xb6/0x1c0 mm/mmu_gather.c:391 exit_mmap+0x358/0x7d0 mm/mmap.c:3081 __mmput+0xcb/0x300 kernel/fork.c:1208 exit_mm+0x1de/0x290 kernel/exit.c:563 do_exit+0x4f2/0x1d10 kernel/exit.c:856 do_group_exit+0x1b9/0x280 kernel/exit.c:1019 __do_sys_exit_group kernel/exit.c:1030 [inline] __se_sys_exit_group kernel/exit.c:1028 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1028 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888072733f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888072733f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888072734000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888072734080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888072734100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================