================================================================== BUG: KASAN: use-after-free in radix_tree_next_chunk+0xf9f/0xfb0 lib/radix-tree.c:1718 Read of size 4 at addr ffff8801a9919148 by task syz-executor4/4565 CPU: 1 PID: 4565 Comm: syz-executor4 Not tainted 4.17.0-rc5+ #59 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+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 radix_tree_next_chunk+0xf9f/0xfb0 lib/radix-tree.c:1718 radix_tree_gang_lookup_tag+0x3d4/0x5f0 lib/radix-tree.c:1916 xfs_perag_get_tag+0x12d/0x7c0 fs/xfs/libxfs/xfs_sb.c:88 xfs_reclaim_inodes_count+0x82/0xb0 fs/xfs/xfs_icache.c:1383 xfs_fs_nr_cached_objects+0x37/0x50 fs/xfs/xfs_super.c:1809 super_cache_count+0x98/0x280 fs/super.c:132 do_shrink_slab mm/vmscan.c:374 [inline] shrink_slab.part.39+0x330/0xf90 mm/vmscan.c:531 shrink_slab+0xa1/0xc0 mm/vmscan.c:506 shrink_node+0x4f2/0x1740 mm/vmscan.c:2561 shrink_zones mm/vmscan.c:2794 [inline] do_try_to_free_pages+0x3c9/0x1240 mm/vmscan.c:2856 try_to_free_mem_cgroup_pages+0x475/0xc50 mm/vmscan.c:3146 reclaim_high.constprop.67+0x12f/0x1d0 mm/memcontrol.c:1862 mem_cgroup_handle_over_high+0x8d/0x130 mm/memcontrol.c:1887 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x274/0x310 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4540ba RSP: 002b:00007fffe23b2a80 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: 00000000000006d4 RBX: 00007fffe23b2a80 RCX: 00000000004540ba RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 00007fffe23b2ac0 R08: 0000000000000001 R09: 00000000022ef940 R10: 00000000022efc10 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000001380 Allocated by task 28685: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x780 mm/slab.c:3620 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] xfs_mount_alloc fs/xfs/xfs_super.c:1587 [inline] xfs_fs_fill_super+0xda/0x1560 fs/xfs/xfs_super.c:1620 mount_bdev+0x30c/0x3e0 fs/super.c:1164 xfs_fs_mount+0x34/0x40 fs/xfs/xfs_super.c:1801 mount_fs+0xae/0x328 fs/super.c:1267 vfs_kern_mount.part.34+0xd4/0x4d0 fs/namespace.c:1037 vfs_kern_mount fs/namespace.c:1027 [inline] do_new_mount fs/namespace.c:2518 [inline] do_mount+0x564/0x3070 fs/namespace.c:2848 ksys_mount+0x12d/0x140 fs/namespace.c:3064 __do_sys_mount fs/namespace.c:3078 [inline] __se_sys_mount fs/namespace.c:3075 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3075 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 28685: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 xfs_fs_fill_super+0x66a/0x1560 fs/xfs/xfs_super.c:1765 mount_bdev+0x30c/0x3e0 fs/super.c:1164 xfs_fs_mount+0x34/0x40 fs/xfs/xfs_super.c:1801 mount_fs+0xae/0x328 fs/super.c:1267 vfs_kern_mount.part.34+0xd4/0x4d0 fs/namespace.c:1037 vfs_kern_mount fs/namespace.c:1027 [inline] do_new_mount fs/namespace.c:2518 [inline] do_mount+0x564/0x3070 fs/namespace.c:2848 ksys_mount+0x12d/0x140 fs/namespace.c:3064 __do_sys_mount fs/namespace.c:3078 [inline] __se_sys_mount fs/namespace.c:3075 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3075 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801a9918d40 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 1032 bytes inside of 4096-byte region [ffff8801a9918d40, ffff8801a9919d40) The buggy address belongs to the page: page:ffffea0006a64600 count:1 mapcount:0 mapping:ffff8801a9918d40 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801a9918d40 0000000000000000 0000000100000001 raw: ffffea0007242720 ffffea00073e6020 ffff8801da800dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801a9919000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801a9919080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801a9919100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801a9919180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801a9919200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================