XFS (loop3): log I/O error -5 ================================================================== BUG: KASAN: use-after-free in xfs_trans_ail_delete+0x57/0x310 fs/xfs/xfs_trans_ail.c:865 Read of size 8 at addr ffff88801dbec600 by task kworker/0:1H/150 CPU: 0 PID: 150 Comm: kworker/0:1H Not tainted 5.15.106-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 Workqueue: xfs-log/loop3 xlog_ioend_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 xfs_trans_ail_delete+0x57/0x310 fs/xfs/xfs_trans_ail.c:865 xfs_buf_item_done+0x5f/0x80 fs/xfs/xfs_buf_item.c:1041 xfs_buf_ioend+0x311/0x6e0 fs/xfs/xfs_buf.c:1286 xfs_trans_committed_bulk+0x300/0x7f0 fs/xfs/xfs_trans.c:780 xlog_cil_committed+0x290/0xd60 fs/xfs/xfs_log_cil.c:631 xlog_cil_process_committed+0x155/0x1a0 fs/xfs/xfs_log_cil.c:659 xlog_state_shutdown_callbacks+0x2b6/0x3a0 fs/xfs/xfs_log.c:516 xlog_force_shutdown+0x1e7/0x200 fs/xfs/xfs_log.c:3896 xfs_do_force_shutdown+0x11d/0x430 fs/xfs/xfs_fsops.c:529 xlog_ioend_work+0xc2/0x120 fs/xfs/xfs_log.c:1364 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2306 worker_thread+0xaca/0x1280 kernel/workqueue.c:2453 kthread+0x3f6/0x4f0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 11978: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc_node+0x199/0x390 mm/slub.c:4455 kmalloc_node include/linux/slab.h:614 [inline] kvmalloc_node+0x80/0x140 mm/util.c:619 kvmalloc include/linux/mm.h:805 [inline] xlog_cil_alloc_shadow_bufs fs/xfs/xfs_log_cil.c:224 [inline] xlog_cil_commit+0x34f/0x24b0 fs/xfs/xfs_log_cil.c:1264 __xfs_trans_commit+0x7e8/0xdd0 fs/xfs/xfs_trans.c:881 xfs_setattr_nonsize+0x868/0xc40 fs/xfs/xfs_iops.c:766 xfs_vn_setattr+0x2f7/0x340 fs/xfs/xfs_iops.c:1050 notify_change+0xd4d/0x1000 fs/attr.c:488 chown_common+0x592/0x890 fs/open.c:680 do_fchownat+0x169/0x240 fs/open.c:711 __do_sys_lchown fs/open.c:736 [inline] __se_sys_lchown fs/open.c:734 [inline] __x64_sys_lchown+0x81/0x90 fs/open.c:734 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x118/0x8a0 kernel/rcu/tree.c:3559 drop_sysctl_table+0x317/0x460 fs/proc/proc_sysctl.c:1680 drop_sysctl_table+0x329/0x460 fs/proc/proc_sysctl.c:1683 unregister_sysctl_table+0x88/0x130 fs/proc/proc_sysctl.c:1718 netfilter_log_sysctl_exit net/netfilter/nf_log.c:513 [inline] nf_log_net_exit+0x5c/0xc0 net/netfilter/nf_log.c:554 ops_exit_list net/core/net_namespace.c:169 [inline] cleanup_net+0x6ce/0xb60 net/core/net_namespace.c:596 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2306 worker_thread+0xaca/0x1280 kernel/workqueue.c:2453 kthread+0x3f6/0x4f0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff88801dbec600 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes inside of 256-byte region [ffff88801dbec600, ffff88801dbec700) The buggy address belongs to the page: page:ffffea000076fb00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1dbec head:ffffea000076fb00 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001dc3800 0000000900000009 ffff888011c41b40 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 9134, ts 460194955338, free_ts 458163826092 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1c9/0x300 mm/slub.c:4403 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] new_dir fs/proc/proc_sysctl.c:954 [inline] get_subdir fs/proc/proc_sysctl.c:999 [inline] __register_sysctl_table+0x9f1/0x1220 fs/proc/proc_sysctl.c:1348 mpls_dev_sysctl_register+0x1ed/0x2d0 net/mpls/af_mpls.c:1421 mpls_add_dev net/mpls/af_mpls.c:1476 [inline] mpls_dev_notify+0x2fc/0x780 net/mpls/af_mpls.c:1621 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:1998 [inline] call_netdevice_notifiers_extack net/core/dev.c:2010 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2024 register_netdevice+0x12c2/0x1700 net/core/dev.c:10358 register_netdev+0x37/0x50 net/core/dev.c:10451 ip6gre_init_net+0x211/0x2e0 net/ipv6/ip6_gre.c:1621 ops_init+0x356/0x600 net/core/net_namespace.c:135 setup_net+0x358/0x9e0 net/core/net_namespace.c:329 copy_net_ns+0x395/0x5d0 net/core/net_namespace.c:473 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 relay_destroy_buf+0x112/0x3a0 kernel/relay.c:204 relay_open_buf+0xa30/0xcd0 kernel/relay.c:416 relay_open+0x39f/0x920 kernel/relay.c:520 do_blk_trace_setup+0x54a/0x9d0 kernel/trace/blktrace.c:559 __blk_trace_setup kernel/trace/blktrace.c:599 [inline] blk_trace_ioctl+0x35b/0x970 kernel/trace/blktrace.c:740 blkdev_ioctl+0x140/0x6b0 block/ioctl.c:590 block_ioctl+0xb1/0xf0 block/fops.c:493 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff88801dbec500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801dbec580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801dbec600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88801dbec680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801dbec700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================