================================================================== BUG: KASAN: slab-use-after-free in unix_stream_read_actor+0xae/0xd0 net/unix/af_unix.c:2961 Read of size 4 at addr ffff888119cdb404 by task syz.8.5419/16395 CPU: 1 UID: 0 PID: 16395 Comm: syz.8.5419 Not tainted 6.12.30-syzkaller-g21ed84930c16 #0 fa4558fba7fa11aa57b2c84caea5bf67b39b1b5f Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:94 dump_stack_lvl+0x10c/0x190 lib/dump_stack.c:120 print_address_description+0x71/0x220 mm/kasan/report.c:377 print_report+0x4a/0x70 mm/kasan/report.c:488 kasan_report+0x163/0x1a0 mm/kasan/report.c:601 __asan_report_load4_noabort+0x18/0x20 mm/kasan/report_generic.c:380 unix_stream_read_actor+0xae/0xd0 net/unix/af_unix.c:2961 unix_stream_recv_urg+0x1f8/0x360 net/unix/af_unix.c:2641 unix_stream_read_generic+0x21ed/0x22d0 net/unix/af_unix.c:2780 unix_stream_recvmsg+0x16c/0x1c0 net/unix/af_unix.c:2998 sock_recvmsg_nosec net/socket.c:1052 [inline] sock_recvmsg+0x219/0x270 net/socket.c:1074 ____sys_recvmsg+0x1ca/0x460 net/socket.c:2829 ___sys_recvmsg+0x1b6/0x510 net/socket.c:2871 __sys_recvmsg net/socket.c:2901 [inline] __do_sys_recvmsg net/socket.c:2911 [inline] __se_sys_recvmsg net/socket.c:2908 [inline] __x64_sys_recvmsg+0x1e8/0x2c0 net/socket.c:2908 x64_sys_call+0xdb5/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:48 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x58/0xf0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f824678e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8244dd6038 EFLAGS: 00000246 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 00007f82469b6080 RCX: 00007f824678e929 RDX: 0000000040010041 RSI: 0000200000000840 RDI: 0000000000000004 RBP: 00007f8246810b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f82469b6080 R15: 00007ffea4b70718 Allocated by task 16394: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x73/0x90 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4164 [inline] slab_alloc_node mm/slub.c:4213 [inline] kmem_cache_alloc_node_noprof+0x139/0x3b0 mm/slub.c:4267 __alloc_skb+0x10c/0x370 net/core/skbuff.c:677 alloc_skb include/linux/skbuff.h:1331 [inline] alloc_skb_with_frags+0xce/0x8b0 net/core/skbuff.c:6622 sock_alloc_send_pskb+0x858/0x990 net/core/sock.c:2902 sock_alloc_send_skb include/net/sock.h:1836 [inline] queue_oob+0xe7/0x4f0 net/unix/af_unix.c:2198 unix_stream_sendmsg+0xf19/0x1080 net/unix/af_unix.c:2352 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0xa15/0xa70 net/socket.c:2610 ___sys_sendmsg+0x220/0x2a0 net/socket.c:2664 __sys_sendmsg net/socket.c:2693 [inline] __do_sys_sendmsg net/socket.c:2702 [inline] __se_sys_sendmsg net/socket.c:2700 [inline] __x64_sys_sendmsg+0x1eb/0x2c0 net/socket.c:2700 x64_sys_call+0x2a4c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x58/0xf0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 16396: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x4a/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2413 [inline] slab_free mm/slub.c:4662 [inline] kmem_cache_free+0x1c1/0x510 mm/slub.c:4769 kfree_skbmem net/core/skbuff.c:-1 [inline] __kfree_skb+0x18f/0x210 net/core/skbuff.c:1215 consume_skb+0x65/0x1a0 net/core/skbuff.c:1446 unix_stream_read_generic+0x1d36/0x22d0 net/unix/af_unix.c:2919 unix_stream_recvmsg+0x16c/0x1c0 net/unix/af_unix.c:2998 sock_recvmsg_nosec net/socket.c:1052 [inline] sock_recvmsg+0x219/0x270 net/socket.c:1074 sock_read_iter+0x232/0x2f0 net/socket.c:1144 new_sync_read fs/read_write.c:489 [inline] vfs_read+0x540/0xb60 fs/read_write.c:570 ksys_read+0x141/0x250 fs/read_write.c:713 __do_sys_read fs/read_write.c:723 [inline] __se_sys_read fs/read_write.c:721 [inline] __x64_sys_read+0x7f/0x90 fs/read_write.c:721 x64_sys_call+0x2638/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x58/0xf0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff888119cdb3c0 which belongs to the cache skbuff_head_cache of size 256 The buggy address is located 68 bytes inside of freed 256-byte region [ffff888119cdb3c0, ffff888119cdb4c0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x119cdb anon flags: 0x4000000000000000(zone=1) page_type: f5(slab) raw: 4000000000000000 ffff888105278640 0000000000000000 dead000000000001 raw: 0000000000000000 00000000800c000c 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 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 0, tgid 0 (swapper/1), ts 69948306060, free_ts 69776069184 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook+0x3b9/0x3f0 mm/page_alloc.c:1795 prep_new_page+0x1c/0x120 mm/page_alloc.c:1803 get_page_from_freelist+0x46bb/0x4750 mm/page_alloc.c:3854 __alloc_pages_noprof+0x30d/0x6c0 mm/page_alloc.c:5186 alloc_slab_page+0x6b/0x1f0 mm/slub.c:-1 allocate_slab+0x69/0x440 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0x59a/0x8b0 mm/slub.c:3897 __slab_alloc mm/slub.c:3987 [inline] __slab_alloc_node mm/slub.c:4040 [inline] slab_alloc_node mm/slub.c:4201 [inline] kmem_cache_alloc_node_noprof+0x20a/0x3b0 mm/slub.c:4267 __alloc_skb+0x10c/0x370 net/core/skbuff.c:677 alloc_skb include/linux/skbuff.h:1331 [inline] wg_packet_send_keepalive+0x66/0x1e0 drivers/net/wireguard/send.c:226 wg_expired_send_persistent_keepalive+0x57/0x80 drivers/net/wireguard/timers.c:141 call_timer_fn+0x49/0x300 kernel/time/timer.c:1797 expire_timers kernel/time/timer.c:1848 [inline] __run_timers kernel/time/timer.c:2422 [inline] __run_timer_base+0x6b3/0x9a0 kernel/time/timer.c:2434 run_timer_base kernel/time/timer.c:2443 [inline] run_timer_softirq+0x35/0x70 kernel/time/timer.c:2453 handle_softirqs+0x1ae/0x630 kernel/softirq.c:603 __do_softirq kernel/softirq.c:641 [inline] invoke_softirq kernel/softirq.c:458 [inline] __irq_exit_rcu+0x48/0xc0 kernel/softirq.c:690 page last free pid 2775 tgid 2773 stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1321 [inline] free_unref_folios+0xcb0/0x1570 mm/page_alloc.c:2865 folios_put_refs+0x4c9/0x5c0 mm/swap.c:1038 free_pages_and_swap_cache+0x272/0x460 mm/swap_state.c:332 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x7ce/0xaf0 mm/mmu_gather.c:373 tlb_finish_mmu+0xcf/0x1d0 mm/mmu_gather.c:465 exit_mmap+0x405/0xb60 mm/mmap.c:1976 __mmput+0x93/0x320 kernel/fork.c:1348 mmput+0x55/0x170 kernel/fork.c:1371 exit_mm kernel/exit.c:574 [inline] do_exit+0x910/0x2630 kernel/exit.c:931 do_group_exit+0x22a/0x300 kernel/exit.c:1094 get_signal+0x139d/0x14f0 kernel/signal.c:2934 arch_do_signal_or_restart+0x96/0x720 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [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+0x58/0xb0 kernel/entry/common.c:218 do_syscall_64+0x64/0xf0 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x76/0x7e Memory state around the buggy address: ffff888119cdb300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888119cdb380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff888119cdb400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888119cdb480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888119cdb500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================