================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: use-after-free in atomic_inc include/linux/atomic/atomic-instrumented.h:435 [inline] BUG: KASAN: use-after-free in __skb_clone+0x483/0x7a0 net/core/skbuff.c:1567 Write of size 4 at addr ffff888064c800e0 by task kworker/R-bat_e/3399 CPU: 0 UID: 0 PID: 3399 Comm: kworker/R-bat_e Not tainted 6.15.0-syzkaller-07818-g12c331b29c73 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_inc include/linux/atomic/atomic-instrumented.h:435 [inline] __skb_clone+0x483/0x7a0 net/core/skbuff.c:1567 skb_clone+0x246/0x3a0 net/core/skbuff.c:2057 deliver_clone net/bridge/br_forward.c:125 [inline] maybe_deliver+0x98/0x160 net/bridge/br_forward.c:190 br_flood+0x31a/0x6a0 net/bridge/br_forward.c:237 br_handle_frame_finish+0x14b4/0x19b0 net/bridge/br_input.c:221 nf_hook_bridge_pre net/bridge/br_input.c:305 [inline] br_handle_frame+0xb89/0x14c0 net/bridge/br_input.c:434 __netif_receive_skb_core+0x10de/0x4180 net/core/dev.c:5863 __netif_receive_skb_one_core net/core/dev.c:5975 [inline] __netif_receive_skb+0x72/0x380 net/core/dev.c:6090 process_backlog+0x60e/0x14f0 net/core/dev.c:6442 __napi_poll+0xc7/0x480 net/core/dev.c:7414 napi_poll net/core/dev.c:7478 [inline] net_rx_action+0x707/0xe30 net/core/dev.c:7605 handle_softirqs+0x286/0x870 kernel/softirq.c:579 do_softirq+0xec/0x180 kernel/softirq.c:480 __local_bh_enable_ip+0x17d/0x1c0 kernel/softirq.c:407 spin_unlock_bh include/linux/spinlock.h:396 [inline] batadv_tvlv_container_ogm_append+0x469/0x4f0 net/batman-adv/tvlv.c:346 batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:820 [inline] batadv_iv_ogm_schedule+0x263/0xea0 net/batman-adv/bat_iv_ogm.c:876 batadv_iv_send_outstanding_bat_ogm_packet+0x6c6/0x7e0 net/batman-adv/bat_iv_ogm.c:1720 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 rescuer_thread+0x53c/0xdd0 kernel/workqueue.c:3498 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888064c86000 pfn:0x64c80 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f0(buddy) raw: 00fff00000000000 ffffea0001477408 ffffea00026d8608 0000000000000000 raw: ffff888064c86000 0000000000000003 00000000f0000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x528c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NORETRY|__GFP_COMP), pid 12344, tgid 12339 (syz.4.1802), ts 389275743054, free_ts 497051632971 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1710 prep_new_page mm/page_alloc.c:1718 [inline] get_page_from_freelist+0x21e0/0x22c0 mm/page_alloc.c:3680 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 skb_page_frag_refill+0x179/0x320 net/core/sock.c:3150 tun_build_skb drivers/net/tun.c:1620 [inline] tun_get_user+0x1b5d/0x3ce0 drivers/net/tun.c:1758 tun_chr_write_iter+0x113/0x200 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x54b/0xa90 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 12344 tgid 12339 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0xc6e/0xe50 mm/page_alloc.c:2717 __folio_put+0x21b/0x2c0 mm/swap.c:112 folio_put include/linux/mm.h:1580 [inline] put_page include/linux/mm.h:1649 [inline] do_exit+0x1a3a/0x2550 kernel/exit.c:998 do_group_exit+0x21c/0x2d0 kernel/exit.c:1108 get_signal+0x1286/0x1340 kernel/signal.c:3034 arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:111 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888064c7ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888064c80000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888064c80080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888064c80100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888064c80180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================