================================================================== BUG: KASAN: out-of-bounds in memmove include/linux/fortify-string.h:207 [inline] BUG: KASAN: out-of-bounds in leaf_paste_entries+0x449/0x910 fs/reiserfs/lbalance.c:1377 Read of size 18446744073709551584 at addr ffff8880514bffa4 by task syz-executor.2/11535 CPU: 0 PID: 11535 Comm: syz-executor.2 Not tainted 5.12.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:186 memmove+0x20/0x60 mm/kasan/shadow.c:54 memmove include/linux/fortify-string.h:207 [inline] leaf_paste_entries+0x449/0x910 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+0x951e/0xd8b0 fs/reiserfs/do_balan.c:1452 do_balance+0x315/0x810 fs/reiserfs/do_balan.c:1888 reiserfs_paste_into_item+0x762/0x8e0 fs/reiserfs/stree.c:2138 reiserfs_add_entry+0x8cb/0xcf0 fs/reiserfs/namei.c:566 reiserfs_mkdir+0x675/0x980 fs/reiserfs/namei.c:859 create_privroot fs/reiserfs/xattr.c:889 [inline] reiserfs_xattr_init+0x4de/0xb60 fs/reiserfs/xattr.c:1012 reiserfs_fill_super+0x2166/0x2e00 fs/reiserfs/super.c:2177 mount_bdev+0x34d/0x410 fs/super.c:1368 legacy_get_tree+0x105/0x220 fs/fs_context.c:592 vfs_get_tree+0x89/0x2f0 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x132a/0x1fa0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x467b1a 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:00007f62cea22fa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 0000000000467b1a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f62cea23000 RBP: 00007f62cea23040 R08: 00007f62cea23040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f62cea23000 R15: 0000000020011500 The buggy address belongs to the page: page:ffffea0001452fc0 refcount:3 mapcount:0 mapping:ffff8881455e6510 index:0x213 pfn:0x514bf memcg:ffff88814010c000 aops:def_blk_aops ino:700002 flags: 0xfff00000002022(referenced|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002022 dead000000000100 dead000000000122 ffff8881455e6510 raw: 0000000000000213 ffff8880839960e8 00000003ffffffff ffff88814010c000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 11535, ts 591540794496, free_ts 517422917488 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5200 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 __page_cache_alloc mm/filemap.c:1005 [inline] __page_cache_alloc+0x303/0x3a0 mm/filemap.c:990 pagecache_get_page+0x38f/0x18d0 mm/filemap.c:1885 find_or_create_page include/linux/pagemap.h:420 [inline] grow_dev_page fs/buffer.c:974 [inline] grow_buffers fs/buffer.c:1039 [inline] __getblk_slow+0x213/0xb60 fs/buffer.c:1066 __getblk_gfp+0x70/0x80 fs/buffer.c:1359 sb_getblk include/linux/buffer_head.h:327 [inline] search_by_key+0x3a8/0x3b80 fs/reiserfs/stree.c:651 search_by_entry_key+0x32/0x960 fs/reiserfs/namei.c:125 reiserfs_find_entry.part.0+0x139/0xdf0 fs/reiserfs/namei.c:321 reiserfs_find_entry fs/reiserfs/namei.c:367 [inline] reiserfs_lookup+0x24a/0x490 fs/reiserfs/namei.c:367 __lookup_slow+0x24c/0x480 fs/namei.c:1629 lookup_one_len+0x163/0x190 fs/namei.c:2650 reiserfs_lookup_privroot+0x92/0x280 fs/reiserfs/xattr.c:980 reiserfs_fill_super+0x2124/0x2e00 fs/reiserfs/super.c:2176 mount_bdev+0x34d/0x410 fs/super.c:1368 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1298 [inline] free_pcp_prepare+0x223/0x300 mm/page_alloc.c:1342 free_unref_page_prepare mm/page_alloc.c:3250 [inline] free_unref_page_list+0x19b/0x7c0 mm/page_alloc.c:3318 release_pages+0x853/0x2120 mm/swap.c:972 __pagevec_lru_add+0xdaa/0x1bf0 mm/swap.c:1065 lru_cache_add+0x5de/0xa40 mm/swap.c:475 putback_lru_page+0x14/0x220 mm/vmscan.c:1170 __collapse_huge_page_copy mm/khugepaged.c:768 [inline] collapse_huge_page mm/khugepaged.c:1183 [inline] khugepaged_scan_pmd mm/khugepaged.c:1368 [inline] khugepaged_scan_mm_slot mm/khugepaged.c:2137 [inline] khugepaged_do_scan mm/khugepaged.c:2218 [inline] khugepaged+0x43fd/0x5530 mm/khugepaged.c:2263 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Memory state around the buggy address: ffff8880514bfe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880514bff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880514bff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880514c0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880514c0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================