netlink: 'syz-executor6': attribute type 2 has an invalid length. XFS (loop2): Invalid device [./file0], error=-15 ================================================================== BUG: KASAN: use-after-free in radix_tree_next_chunk+0xf9f/0xfb0 lib/radix-tree.c:1720 Read of size 4 at addr ffff8801acb3c648 by task syz-executor3/19275 CPU: 1 PID: 19275 Comm: syz-executor3 Not tainted 4.17.0-rc5+ #56 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 netlink: 'syz-executor6': attribute type 2 has an invalid length. 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:1720 radix_tree_gang_lookup_tag+0x3d4/0x5f0 lib/radix-tree.c:1918 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+0x32e/0x390 arch/x86/entry/common.c:196 retint_user+0x8/0x18 RIP: 0033:0x40af88 RSP: 002b:00007fff53ad1700 EFLAGS: 00010246 RAX: 000000009192917d RBX: 0000000026ef102d RCX: 0000000000000000 RDX: 0000000000000000 RSI: 000000000000117d RDI: ffffffff9192917d RBP: 0000000000000004 R08: 000000009192917d R09: 0000000091929181 R10: 00007fff53ad1790 R11: 0000000000000246 R12: 000000000072bea0 R13: 0000000080000000 R14: 00007f3925d24008 R15: 0000000000000004 Allocated by task 19282: 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 19282: 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 ffff8801acb3c240 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 1032 bytes inside of 4096-byte region [ffff8801acb3c240, ffff8801acb3d240) The buggy address belongs to the page: page:ffffea0006b2cf00 count:1 mapcount:0 mapping:ffff8801acb3c240 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801acb3c240 0000000000000000 0000000100000001 raw: ffffea0007273aa0 ffffea000617cb20 ffff8801da800dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801acb3c500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801acb3c580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801acb3c600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801acb3c680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801acb3c700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================