================================================================== BUG: KASAN: slab-use-after-free in ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5959 [inline] BUG: KASAN: slab-use-after-free in __ocfs2_flush_truncate_log+0x824/0x1250 fs/ocfs2/alloc.c:6054 Read of size 4 at addr ffff8880306062b8 by task syz-executor/5322 CPU: 1 UID: 0 PID: 5322 Comm: syz-executor Not tainted 6.12.0-rc1-syzkaller-00031-ge32cde8d2bd7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5959 [inline] __ocfs2_flush_truncate_log+0x824/0x1250 fs/ocfs2/alloc.c:6054 ocfs2_flush_truncate_log+0x4f/0x70 fs/ocfs2/alloc.c:6076 ocfs2_sync_fs+0x125/0x390 fs/ocfs2/super.c:402 sync_filesystem+0x1c8/0x230 fs/sync.c:66 generic_shutdown_super+0x72/0x2d0 fs/super.c:621 kill_block_super+0x44/0x90 fs/super.c:1696 deactivate_locked_super+0xc4/0x130 fs/super.c:473 cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1373 task_work_run+0x24f/0x310 kernel/task_work.c:228 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x168/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1c9777f327 Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffe39989008 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f1c9777f327 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffe399890c0 RBP: 00007ffe399890c0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffe3998a140 R13: 00007f1c977f0134 R14: 000000000001142d R15: 00007ffe3998a180 Allocated by task 5326: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4086 [inline] slab_alloc_node mm/slub.c:4135 [inline] kmem_cache_alloc_node_noprof+0x16b/0x320 mm/slub.c:4187 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1322 [inline] alloc_uevent_skb+0x74/0x230 lib/kobject_uevent.c:289 uevent_net_broadcast_tagged lib/kobject_uevent.c:352 [inline] kobject_uevent_net_broadcast+0x182/0x580 lib/kobject_uevent.c:413 kobject_uevent_env+0x57d/0x8e0 lib/kobject_uevent.c:608 netdev_queue_add_kobject net/core/net-sysfs.c:1800 [inline] netdev_queue_update_kobjects+0x28d/0x550 net/core/net-sysfs.c:1841 register_queue_kobjects net/core/net-sysfs.c:1903 [inline] netdev_register_kobject+0x265/0x310 net/core/net-sysfs.c:2143 register_netdevice+0x12c5/0x1b00 net/core/dev.c:10487 register_netdev+0x3b/0x50 net/core/dev.c:10624 sit_init_net+0x1f9/0x500 net/ipv6/sit.c:1861 ops_init+0x31e/0x590 net/core/net_namespace.c:139 setup_net+0x287/0x9e0 net/core/net_namespace.c:356 copy_net_ns+0x33f/0x570 net/core/net_namespace.c:494 create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228 ksys_unshare+0x619/0xc10 kernel/fork.c:3315 __do_sys_unshare kernel/fork.c:3386 [inline] __se_sys_unshare kernel/fork.c:3384 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3384 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5326: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2343 [inline] slab_free mm/slub.c:4580 [inline] kmem_cache_free+0x1a2/0x420 mm/slub.c:4682 netlink_broadcast_filtered+0x116d/0x12a0 net/netlink/af_netlink.c:1542 netlink_broadcast+0x39/0x50 net/netlink/af_netlink.c:1564 uevent_net_broadcast_tagged lib/kobject_uevent.c:373 [inline] kobject_uevent_net_broadcast+0x4e8/0x580 lib/kobject_uevent.c:413 kobject_uevent_env+0x57d/0x8e0 lib/kobject_uevent.c:608 netdev_queue_add_kobject net/core/net-sysfs.c:1800 [inline] netdev_queue_update_kobjects+0x28d/0x550 net/core/net-sysfs.c:1841 register_queue_kobjects net/core/net-sysfs.c:1903 [inline] netdev_register_kobject+0x265/0x310 net/core/net-sysfs.c:2143 register_netdevice+0x12c5/0x1b00 net/core/dev.c:10487 register_netdev+0x3b/0x50 net/core/dev.c:10624 sit_init_net+0x1f9/0x500 net/ipv6/sit.c:1861 ops_init+0x31e/0x590 net/core/net_namespace.c:139 setup_net+0x287/0x9e0 net/core/net_namespace.c:356 copy_net_ns+0x33f/0x570 net/core/net_namespace.c:494 create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228 ksys_unshare+0x619/0xc10 kernel/fork.c:3315 __do_sys_unshare kernel/fork.c:3386 [inline] __se_sys_unshare kernel/fork.c:3384 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3384 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888030606280 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 56 bytes inside of freed 240-byte region [ffff888030606280, ffff888030606370) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x30606 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff8881416d3780 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000c000c 00000001f5000000 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5326, tgid 5326 (syz-executor), ts 63745002015, free_ts 61227679858 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x3039/0x3180 mm/page_alloc.c:3457 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x120 mm/slub.c:2413 allocate_slab+0x5a/0x2f0 mm/slub.c:2579 new_slab mm/slub.c:2632 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3819 __slab_alloc+0x58/0xa0 mm/slub.c:3909 __slab_alloc_node mm/slub.c:3962 [inline] slab_alloc_node mm/slub.c:4123 [inline] kmem_cache_alloc_node_noprof+0x1fe/0x320 mm/slub.c:4187 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1322 [inline] alloc_uevent_skb+0x74/0x230 lib/kobject_uevent.c:289 uevent_net_broadcast_tagged lib/kobject_uevent.c:352 [inline] kobject_uevent_net_broadcast+0x182/0x580 lib/kobject_uevent.c:413 kobject_uevent_env+0x57d/0x8e0 lib/kobject_uevent.c:608 device_add+0x63b/0xbf0 drivers/base/core.c:3656 netdev_register_kobject+0x17e/0x310 net/core/net-sysfs.c:2139 register_netdevice+0x12c5/0x1b00 net/core/dev.c:10487 page last free pid 8 tgid 8 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0xcd0/0xf00 mm/page_alloc.c:2638 kasan_depopulate_vmalloc_pte+0x74/0x90 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2817 [inline] apply_to_pmd_range mm/memory.c:2861 [inline] apply_to_pud_range mm/memory.c:2897 [inline] apply_to_p4d_range mm/memory.c:2933 [inline] __apply_to_page_range+0x806/0xde0 mm/memory.c:2967 kasan_release_vmalloc+0x9a/0xb0 mm/kasan/shadow.c:525 purge_vmap_node+0x417/0x810 mm/vmalloc.c:2204 __purge_vmap_area_lazy+0x708/0xae0 mm/vmalloc.c:2288 drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2322 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888030606180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888030606200: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc >ffff888030606280: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888030606300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff888030606380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================