loop3: detected capacity change from 0 to 4096 ================================================================== BUG: KASAN: slab-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: slab-out-of-bounds in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: slab-out-of-bounds in NInoAttr fs/ntfs/inode.h:200 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_test_inode+0x96/0x2f0 fs/ntfs/inode.c:55 Read of size 8 at addr ffff88803f42ce88 by task syz-executor.3/2245 CPU: 0 PID: 2245 Comm: syz-executor.3 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x6e9 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:71 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] NInoAttr fs/ntfs/inode.h:200 [inline] ntfs_test_inode+0x96/0x2f0 fs/ntfs/inode.c:55 find_inode+0xe4/0x220 fs/inode.c:915 ilookup5_nowait fs/inode.c:1428 [inline] ilookup5 fs/inode.c:1457 [inline] iget5_locked+0xb1/0x2c0 fs/inode.c:1238 ntfs_iget+0x9d/0x180 fs/ntfs/inode.c:168 load_system_files fs/ntfs/super.c:1825 [inline] ntfs_fill_super+0x3a0d/0x92d0 fs/ntfs/super.c:2892 mount_bdev+0x34d/0x410 fs/super.c:1400 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 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+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f21ce08cada 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:00007f21cf195f88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f21ce08cada RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f21cf195fe0 RBP: 00007f21cf196020 R08: 00007f21cf196020 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f21cf195fe0 R15: 0000000020079ca0 Allocated by task 31289: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] __kasan_slab_alloc+0x85/0xb0 mm/kasan/common.c:470 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc mm/slab.c:3294 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x1ad/0x520 mm/slab.c:3491 radix_tree_node_alloc.constprop.0+0x1e4/0x350 lib/radix-tree.c:251 idr_get_free+0x54f/0xa70 lib/radix-tree.c:1505 idr_alloc_u32+0x170/0x2d0 lib/idr.c:46 idr_alloc_cyclic+0x102/0x230 lib/idr.c:125 __kernfs_new_node+0x117/0x8b0 fs/kernfs/dir.c:609 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:665 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:1043 sysfs_add_file_mode_ns+0x20f/0x3f0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x322/0xb10 fs/sysfs/group.c:148 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:188 internal_create_groups fs/sysfs/group.c:184 [inline] sysfs_create_groups+0x25/0x50 fs/sysfs/group.c:214 create_dir lib/kobject.c:68 [inline] kobject_add_internal+0x318/0x8f0 lib/kobject.c:223 kobject_add_varg lib/kobject.c:358 [inline] kobject_init_and_add+0x101/0x160 lib/kobject.c:441 nilfs_sysfs_create_segments_group fs/nilfs2/sysfs.c:438 [inline] nilfs_sysfs_create_device_group+0x434/0x850 fs/nilfs2/sysfs.c:1004 init_nilfs+0xdfb/0x1280 fs/nilfs2/the_nilfs.c:637 nilfs_fill_super fs/nilfs2/super.c:1047 [inline] nilfs_mount+0x868/0xfb0 fs/nilfs2/super.c:1317 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 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+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 __kasan_record_aux_stack+0x7e/0x90 mm/kasan/generic.c:348 call_rcu+0x99/0x790 kernel/rcu/tree.c:2796 xa_node_free lib/xarray.c:260 [inline] xas_delete_node lib/xarray.c:497 [inline] update_node lib/xarray.c:761 [inline] xas_store+0xb26/0x1bc0 lib/xarray.c:846 page_cache_delete_batch mm/filemap.c:312 [inline] delete_from_page_cache_batch+0x9ea/0xde0 mm/filemap.c:334 truncate_inode_pages_range+0x28e/0x1510 mm/truncate.c:370 kill_bdev block/bdev.c:76 [inline] blkdev_flush_mapping+0x140/0x2f0 block/bdev.c:662 blkdev_put_whole+0xd1/0xf0 block/bdev.c:693 blkdev_put+0x226/0x770 block/bdev.c:953 deactivate_locked_super+0x94/0x160 fs/super.c:331 deactivate_super+0xad/0xd0 fs/super.c:362 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1186 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:169 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 __kasan_record_aux_stack+0x7e/0x90 mm/kasan/generic.c:348 call_rcu+0x99/0x790 kernel/rcu/tree.c:2796 xa_node_free lib/xarray.c:260 [inline] xas_delete_node lib/xarray.c:497 [inline] update_node lib/xarray.c:761 [inline] xas_store+0xb26/0x1bc0 lib/xarray.c:846 page_cache_delete_batch mm/filemap.c:312 [inline] delete_from_page_cache_batch+0x9ea/0xde0 mm/filemap.c:334 truncate_inode_pages_range+0x28e/0x1510 mm/truncate.c:370 kill_bdev block/bdev.c:76 [inline] blkdev_flush_mapping+0x140/0x2f0 block/bdev.c:662 blkdev_put_whole+0xd1/0xf0 block/bdev.c:693 blkdev_put+0x226/0x770 block/bdev.c:953 deactivate_locked_super+0x94/0x160 fs/super.c:331 deactivate_super+0xad/0xd0 fs/super.c:362 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1186 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:169 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88803f42cbc0 which belongs to the cache radix_tree_node of size 576 The buggy address is located 136 bytes to the right of 576-byte region [ffff88803f42cbc0, ffff88803f42ce00) The buggy address belongs to the physical page: page:ffffea0000fd0b00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88803f42cffb pfn:0x3f42c memcg:ffff888076c8df81 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000feeec8 ffffea0000fe1e08 ffff888011853400 raw: ffff88803f42cffb ffff88803f42c0c0 0000000100000005 ffff888076c8df81 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x342230(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE|__GFP_RECLAIMABLE), pid 23094, tgid 23093 (syz-executor.0), ts 1080398857487, free_ts 225814429599 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 __alloc_pages_node include/linux/gfp.h:243 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x75/0x360 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] __do_cache_alloc mm/slab.c:3246 [inline] slab_alloc mm/slab.c:3287 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x433/0x520 mm/slab.c:3491 radix_tree_node_alloc.constprop.0+0x1e4/0x350 lib/radix-tree.c:251 idr_get_free+0x54f/0xa70 lib/radix-tree.c:1505 idr_alloc_u32+0x170/0x2d0 lib/idr.c:46 idr_alloc_cyclic+0x102/0x230 lib/idr.c:125 alloc_pid+0x5bd/0xd70 kernel/pid.c:233 copy_process+0x3d01/0x7110 kernel/fork.c:2270 create_io_thread+0xab/0xe0 kernel/fork.c:2620 create_worker_cont+0xe6/0x510 io_uring/io-wq.c:751 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 get_signal+0x1c3/0x2430 kernel/signal.c:2635 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 slab_destroy mm/slab.c:1615 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1635 cache_flusharray mm/slab.c:3389 [inline] ___cache_free+0x2a8/0x3d0 mm/slab.c:3452 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:447 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc_node mm/slab.c:3232 [inline] kmem_cache_alloc_node_trace+0x308/0x570 mm/slab.c:3601 __do_kmalloc_node mm/slab.c:3623 [inline] __kmalloc_node+0x38/0x60 mm/slab.c:3631 kmalloc_node include/linux/slab.h:623 [inline] kvmalloc_node+0x3f/0x1b0 mm/util.c:613 kvmalloc include/linux/slab.h:750 [inline] kvzalloc include/linux/slab.h:758 [inline] allocate_hook_entries_size net/netfilter/core.c:61 [inline] __nf_hook_entries_try_shrink+0x149/0x4d0 net/netfilter/core.c:248 __nf_unregister_net_hook+0x1bb/0x6d0 net/netfilter/core.c:508 nf_unregister_net_hook net/netfilter/core.c:527 [inline] nf_unregister_net_hooks+0x117/0x160 net/netfilter/core.c:601 nf_ct_netns_do_put+0x33a/0x530 net/netfilter/nf_conntrack_proto.c:560 nf_ct_netns_put net/netfilter/nf_conntrack_proto.c:641 [inline] nf_ct_netns_put+0x49/0x80 net/netfilter/nf_conntrack_proto.c:634 nf_conncount_destroy+0x45/0x190 net/netfilter/nf_conncount.c:592 Memory state around the buggy address: ffff88803f42cd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803f42ce00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803f42ce80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88803f42cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803f42cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================