XFS (loop2): Unmounting Filesystem ================================================================== BUG: KASAN: use-after-free in crc_itu_t+0x218/0x2a0 lib/crc-itu-t.c:60 Read of size 1 at addr ffff888073711000 by task syz-executor/4443 CPU: 1 PID: 4443 Comm: syz-executor Not tainted 6.1.106-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 crc_itu_t+0x218/0x2a0 lib/crc-itu-t.c:60 udf_finalize_lvid fs/udf/super.c:2023 [inline] udf_sync_fs+0x1ce/0x380 fs/udf/super.c:2379 sync_filesystem+0xe8/0x220 fs/sync.c:56 generic_shutdown_super+0x6b/0x340 fs/super.c:474 kill_block_super+0x7a/0xe0 fs/super.c:1470 deactivate_locked_super+0xa0/0x110 fs/super.c:332 cleanup_mnt+0x490/0x520 fs/namespace.c:1186 task_work_run+0x246/0x300 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0xa73/0x26a0 kernel/exit.c:871 do_group_exit+0x202/0x2b0 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1030 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0e6d779e79 Code: Unable to access opcode bytes at 0x7f0e6d779e4f. RSP: 002b:00007fff462a1a18 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f0e6d7e784e RCX: 00007f0e6d779e79 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: 0000000000000010 R08: 00007fff4629f7b6 R09: 00007fff462a2cd0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff462a2cd0 R13: 00007f0e6d7e77dc R14: 0000555556ddf4a8 R15: 00007fff462a3d90 Allocated by task 3970: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:682 [inline] __kernfs_new_node+0xd4/0x870 fs/kernfs/dir.c:614 kernfs_new_node+0x136/0x230 fs/kernfs/dir.c:690 __kernfs_create_file+0x45/0x2e0 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x246/0x300 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x545/0xed0 fs/sysfs/group.c:148 internal_create_groups fs/sysfs/group.c:188 [inline] sysfs_create_groups+0x52/0x110 fs/sysfs/group.c:214 create_dir lib/kobject.c:68 [inline] kobject_add_internal+0x725/0xd10 lib/kobject.c:231 kobject_add_varg lib/kobject.c:366 [inline] kobject_init_and_add+0x120/0x190 lib/kobject.c:449 netdev_queue_add_kobject net/core/net-sysfs.c:1664 [inline] netdev_queue_update_kobjects+0x1f2/0x480 net/core/net-sysfs.c:1716 register_queue_kobjects net/core/net-sysfs.c:1777 [inline] netdev_register_kobject+0x263/0x310 net/core/net-sysfs.c:2017 register_netdevice+0x108a/0x1720 net/core/dev.c:10099 register_netdev+0x37/0x50 net/core/dev.c:10225 ip6gre_init_net+0x211/0x2e0 net/ipv6/ip6_gre.c:1647 ops_init+0x35d/0x610 net/core/net_namespace.c:138 setup_net+0x4b5/0xb90 net/core/net_namespace.c:335 copy_net_ns+0x392/0x5d0 net/core/net_namespace.c:481 create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226 ksys_unshare+0x580/0xb20 kernel/fork.c:3203 __do_sys_unshare kernel/fork.c:3274 [inline] __se_sys_unshare kernel/fork.c:3272 [inline] __x64_sys_unshare+0x34/0x40 kernel/fork.c:3272 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff888073711000 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 0 bytes inside of 168-byte region [ffff888073711000, ffff8880737110a8) The buggy address belongs to the physical page: page:ffffea0001cdc440 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880737111d0 pfn:0x73711 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00019ea948 ffffea0001f559c8 ffff888012a40c80 raw: ffff8880737111d0 0000000000110008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 3970, tgid 3970 (syz-executor), ts 89798780236, free_ts 88392571658 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2517 prep_new_page mm/page_alloc.c:2524 [inline] get_page_from_freelist+0x322e/0x33b0 mm/page_alloc.c:4290 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5558 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x1a5/0x2d0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:682 [inline] __kernfs_new_node+0xd4/0x870 fs/kernfs/dir.c:614 kernfs_new_node+0x136/0x230 fs/kernfs/dir.c:690 __kernfs_create_file+0x45/0x2e0 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x246/0x300 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x545/0xed0 fs/sysfs/group.c:148 internal_create_groups fs/sysfs/group.c:188 [inline] sysfs_create_groups+0x52/0x110 fs/sysfs/group.c:214 create_dir lib/kobject.c:68 [inline] kobject_add_internal+0x725/0xd10 lib/kobject.c:231 kobject_add_varg lib/kobject.c:366 [inline] kobject_init_and_add+0x120/0x190 lib/kobject.c:449 netdev_queue_add_kobject net/core/net-sysfs.c:1664 [inline] netdev_queue_update_kobjects+0x1f2/0x480 net/core/net-sysfs.c:1716 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1444 [inline] free_pcp_prepare mm/page_alloc.c:1494 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3369 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3464 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x156/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc_lru+0x10c/0x2d0 mm/slub.c:3429 __d_alloc+0x31/0x710 fs/dcache.c:1774 d_alloc fs/dcache.c:1854 [inline] d_alloc_parallel+0xdd/0x1590 fs/dcache.c:2645 __lookup_slow+0x113/0x3d0 fs/namei.c:1675 lookup_one_len+0x187/0x2d0 fs/namei.c:2742 start_creating+0x17f/0x310 fs/debugfs/inode.c:377 __debugfs_create_file+0x74/0x500 fs/debugfs/inode.c:422 nsim_ipsec_init+0xf6/0x130 drivers/net/netdevsim/ipsec.c:286 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:315 [inline] nsim_create+0x332/0x3f0 drivers/net/netdevsim/netdev.c:365 __nsim_dev_port_add+0x6ba/0xb10 drivers/net/netdevsim/dev.c:1393 Memory state around the buggy address: ffff888073710f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888073710f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888073711000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888073711080: fb fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb ffff888073711100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================