================================================================== 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 ffff8880564680e0 by task kworker/u8:1/13 CPU: 0 UID: 0 PID: 13 Comm: kworker/u8:1 Not tainted 6.16.0-rc2-syzkaller-00591-g4f4040ea5d3e #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: wg-kex-wg2 wg_packet_handshake_send_worker 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:5861 __netif_receive_skb_one_core net/core/dev.c:5973 [inline] __netif_receive_skb+0x72/0x380 net/core/dev.c:6088 process_backlog+0x60e/0x14f0 net/core/dev.c:6440 __napi_poll+0xc4/0x480 net/core/dev.c:7453 napi_poll net/core/dev.c:7517 [inline] net_rx_action+0x707/0xe30 net/core/dev.c:7644 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 local_bh_enable include/linux/bottom_half.h:33 [inline] fpregs_unlock arch/x86/include/asm/fpu/api.h:77 [inline] kernel_fpu_end+0xd2/0x120 arch/x86/kernel/fpu/core.c:476 blake2s_compress+0x5f/0xd0 arch/x86/lib/crypto/blake2s-glue.c:46 blake2s_update+0x14b/0x450 lib/crypto/blake2s.c:32 hmac+0x288/0x330 drivers/net/wireguard/noise.c:332 kdf+0xde/0x270 drivers/net/wireguard/noise.c:360 mix_precomputed_dh drivers/net/wireguard/noise.c:426 [inline] wg_noise_handshake_create_initiation+0x462/0x7e0 drivers/net/wireguard/noise.c:560 wg_packet_send_handshake_initiation drivers/net/wireguard/send.c:34 [inline] wg_packet_handshake_send_worker+0x163/0x320 drivers/net/wireguard/send.c:51 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3f9/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:0xffff88805646c000 pfn:0x56468 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea000128c008 ffff8880b873fdf0 0000000000000000 raw: ffff88805646c000 0000000000000000 00000000ffffffff 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 13978, tgid 13973 (syz.3.2738), ts 408376738734, free_ts 543681927040 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2510 skb_page_frag_refill+0x179/0x320 net/core/sock.c:3142 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+0x548/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 13978 tgid 13973 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706 __folio_put+0x21b/0x2c0 mm/swap.c:112 folio_put include/linux/mm.h:1356 [inline] put_page include/linux/mm.h:1425 [inline] do_exit+0x1816/0x22e0 kernel/exit.c:994 do_group_exit+0x21c/0x2d0 kernel/exit.c:1104 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: ffff888056467f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888056468000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888056468080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888056468100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888056468180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================