XFS (loop5): Filesystem has been shut down due to log error (0x2). XFS (loop5): Please unmount the filesystem and rectify the problem(s). ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x114/0x764c kernel/locking/lockdep.c:4926 Read of size 8 at addr ffff0000d4678858 by task kworker/1:1H/51 CPU: 1 PID: 51 Comm: kworker/1:1H Not tainted 6.1.36-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Workqueue: xfs-log/loop5 xlog_ioend_work Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:395 kasan_report+0xd4/0x130 mm/kasan/report.c:495 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 __lock_acquire+0x114/0x764c kernel/locking/lockdep.c:4926 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x54/0x6c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:350 [inline] xfs_trans_committed_bulk+0xe4/0x73c fs/xfs/xfs_trans.c:773 xlog_cil_committed+0x21c/0xd64 fs/xfs/xfs_log_cil.c:795 xlog_cil_process_committed+0x11c/0x174 fs/xfs/xfs_log_cil.c:823 xlog_state_shutdown_callbacks+0x23c/0x324 fs/xfs/xfs_log.c:538 xlog_force_shutdown+0x29c/0x350 fs/xfs/xfs_log.c:3821 xlog_ioend_work+0xa8/0xf8 fs/xfs/xfs_log.c:1402 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289 worker_thread+0x8e4/0xfec kernel/workqueue.c:2436 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Allocated by task 14325: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xd8/0x1c4 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] kmem_alloc+0x1bc/0x518 fs/xfs/kmem.c:20 kmem_zalloc fs/xfs/kmem.h:69 [inline] xfs_trans_ail_init+0x2c/0x220 fs/xfs/xfs_trans_ail.c:902 xfs_log_mount+0x294/0x6e0 fs/xfs/xfs_log.c:721 xfs_mountfs+0xa04/0x18fc fs/xfs/xfs_mount.c:805 xfs_fs_fill_super+0xd38/0xf50 fs/xfs/xfs_super.c:1666 get_tree_bdev+0x360/0x54c fs/super.c:1346 xfs_fs_get_tree+0x28/0x38 fs/xfs/xfs_super.c:1713 vfs_get_tree+0x90/0x274 fs/super.c:1553 do_new_mount+0x25c/0x8c4 fs/namespace.c:3040 path_mount+0x590/0xe58 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] __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3568 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 Freed by task 4258: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x2c0/0x4b4 mm/slub.c:3674 kfree+0xcc/0x1b8 mm/slab_common.c:1007 kvfree+0x40/0x50 mm/util.c:627 kmem_free fs/xfs/kmem.h:62 [inline] xfs_trans_ail_destroy+0x60/0x70 fs/xfs/xfs_trans_ail.c:933 xfs_log_unmount+0x54/0xbc fs/xfs/xfs_log.c:1116 xfs_unmountfs+0x130/0x1d0 fs/xfs/xfs_mount.c:1081 xfs_fs_put_super+0x78/0x260 fs/xfs/xfs_super.c:1115 generic_shutdown_super+0x130/0x328 fs/super.c:501 kill_block_super+0x70/0xdc fs/super.c:1450 deactivate_locked_super+0xac/0x124 fs/super.c:332 deactivate_super+0xf0/0x110 fs/super.c:363 cleanup_mnt+0x394/0x41c fs/namespace.c:1186 __cleanup_mnt+0x20/0x30 fs/namespace.c:1193 task_work_run+0x240/0x2f0 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x2144/0x3470 arch/arm64/kernel/signal.c:1132 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 Last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 insert_work+0x64/0x384 kernel/workqueue.c:1358 __queue_work+0xd48/0x136c kernel/workqueue.c:1517 queue_work_on+0xc0/0x16c kernel/workqueue.c:1545 queue_work include/linux/workqueue.h:503 [inline] call_usermodehelper_exec+0x238/0x48c kernel/umh.c:437 call_modprobe kernel/kmod.c:98 [inline] __request_module+0x45c/0xad8 kernel/kmod.c:170 ebt_check_match net/bridge/netfilter/ebtables.c:409 [inline] ebt_check_entry net/bridge/netfilter/ebtables.c:739 [inline] translate_table+0x22d8/0x3be4 net/bridge/netfilter/ebtables.c:976 do_replace_finish+0xa94/0x17b4 net/bridge/netfilter/ebtables.c:1032 do_replace+0x494/0x6b0 net/bridge/netfilter/ebtables.c:1151 do_ebt_set_ctl+0x1a4/0x13e8 net/bridge/netfilter/ebtables.c:2522 nf_setsockopt+0x270/0x290 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x118/0x128 net/ipv4/ip_sockglue.c:1466 udp_setsockopt+0xa4/0xbc net/ipv4/udp.c:2796 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3646 __sys_setsockopt+0x3a8/0x70c net/socket.c:2252 __do_sys_setsockopt net/socket.c:2263 [inline] __se_sys_setsockopt net/socket.c:2260 [inline] __arm64_sys_setsockopt+0xb8/0xd4 net/socket.c:2260 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 Second to last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 kvfree_call_rcu+0xb4/0x714 kernel/rcu/tree.c:3355 drop_sysctl_table+0x274/0x3a0 fs/proc/proc_sysctl.c:1729 drop_sysctl_table+0x284/0x3a0 fs/proc/proc_sysctl.c:1732 drop_sysctl_table+0x284/0x3a0 fs/proc/proc_sysctl.c:1732 unregister_sysctl_table+0x90/0x12c fs/proc/proc_sysctl.c:1767 unregister_net_sysctl_table+0x20/0x30 net/sysctl_net.c:175 __devinet_sysctl_unregister net/ipv4/devinet.c:2609 [inline] devinet_exit_net+0x16c/0x1ec net/ipv4/devinet.c:2754 ops_exit_list net/core/net_namespace.c:169 [inline] cleanup_net+0x564/0x994 net/core/net_namespace.c:601 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289 worker_thread+0x8e4/0xfec kernel/workqueue.c:2436 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 The buggy address belongs to the object at ffff0000d4678800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 88 bytes inside of 256-byte region [ffff0000d4678800, ffff0000d4678900) The buggy address belongs to the physical page: page:00000000645c23ae refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x114678 head:00000000645c23ae order:1 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc0003432280 dead000000000004 ffff0000c0002480 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d4678700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d4678780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000d4678800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d4678880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d4678900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== XFS (): xfs_trans_ail_delete: attempting to delete a log item that is not in the AIL Unable to handle kernel paging request at virtual address ffff70003c1f1c14 KASAN: maybe wild-memory-access in range [0xffff8001e0f8e0a0-0xffff8001e0f8e0a7] Mem abort info: ESR = 0x0000000096000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000001b1f53000 [ffff70003c1f1c14] pgd=000000023ec4c003, p4d=000000023ec4c003, pud=000000023ec4b003, pmd=0000000000000000 Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 51 Comm: kworker/1:1H Tainted: G B 6.1.36-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Workqueue: xfs-log/loop5 xlog_ioend_work pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : xfs_log_force+0x174/0xa4c fs/xfs/xfs_log.c:3204 lr : xfs_log_force+0x14c/0xa4c fs/xfs/xfs_log.c:3204 sp : ffff80001b0d7310 x29: ffff80001b0d7310 x28: 0000000000000001 x27: ffff8000155c1130 x26: dfff800000000000 x25: ffff80001550f008 x24: 0000000041ed0011 x23: ffff8001e0f8e0a1 x22: 0000000000000000 x21: ffff800009c41b60 x20: ffff0000d420a1d0 x19: 0000000000000001 x18: 1fffe000368b9f76 x17: 0000000000000040 x16: ffff80001210ac24 x15: 0000000000000000 x14: 0000000000000040 x13: ffffffffffffffff x12: 0000000000000001 x11: ff80800009c3bf34 x10: 0000000000000000 x9 : ffff800009c3bf34 x8 : 1ffff0003c1f1c14 x7 : 0000000000000000 x6 : ffff8000082607e4 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800009c3be38 x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000008 Call trace: xfs_log_force+0x174/0xa4c fs/xfs/xfs_log.c:3204 xlog_force_shutdown+0xac/0x350 fs/xfs/xfs_log.c:3765 xfs_trans_ail_delete+0x124/0x2b0 fs/xfs/xfs_trans_ail.c:885 xfs_buf_item_done+0x58/0x94 fs/xfs/xfs_buf_item.c:1042 xfs_buf_ioend+0x2d4/0x78c fs/xfs/xfs_buf.c:1326 xfs_buf_ioend_fail+0x78/0x90 fs/xfs/xfs_buf.c:1397 xfs_buf_item_unpin+0x224/0x918 fs/xfs/xfs_buf_item.c:549 xfs_trans_committed_bulk+0x2d8/0x73c fs/xfs/xfs_trans.c:806 xlog_cil_committed+0x21c/0xd64 fs/xfs/xfs_log_cil.c:795 xlog_cil_process_committed+0x11c/0x174 fs/xfs/xfs_log_cil.c:823 xlog_state_shutdown_callbacks+0x23c/0x324 fs/xfs/xfs_log.c:538 xlog_force_shutdown+0x29c/0x350 fs/xfs/xfs_log.c:3821 xlog_ioend_work+0xa8/0xf8 fs/xfs/xfs_log.c:1402 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289 worker_thread+0x8e4/0xfec kernel/workqueue.c:2436 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Code: f94002e8 8b180108 91024117 d343fee8 (38fa6908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: f94002e8 ldr x8, [x23] 4: 8b180108 add x8, x8, x24 8: 91024117 add x23, x8, #0x90 c: d343fee8 lsr x8, x23, #3 * 10: 38fa6908 ldrsb w8, [x8, x26] <-- trapping instruction