================================================================== 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 ffff88811bef1684 by task syz.2.128/906 CPU: 0 UID: 0 PID: 906 Comm: syz.2.128 Not tainted 6.12.30-syzkaller #0 10700cb2f490427e36ff3a76623de1c79f3a09af 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+0x1fb/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:1051 [inline] sock_recvmsg+0x216/0x270 net/socket.c:1073 ____sys_recvmsg+0x1ca/0x460 net/socket.c:2826 ___sys_recvmsg+0x1b6/0x510 net/socket.c:2868 __sys_recvmsg net/socket.c:2898 [inline] __do_sys_recvmsg net/socket.c:2908 [inline] __se_sys_recvmsg net/socket.c:2905 [inline] __x64_sys_recvmsg+0x1e8/0x2c0 net/socket.c:2905 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:0x7f022a98e929 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:00007f022a3ff038 EFLAGS: 00000246 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 00007f022abb6080 RCX: 00007f022a98e929 RDX: 0000000040010041 RSI: 0000200000000840 RDI: 0000000000000003 RBP: 00007f022aa10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f022abb6080 R15: 00007ffcadf04a78 Allocated by task 905: 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:4104 [inline] slab_alloc_node mm/slub.c:4153 [inline] kmem_cache_alloc_node_noprof+0x132/0x370 mm/slub.c:4205 __alloc_skb+0x143/0x340 net/core/skbuff.c:671 alloc_skb include/linux/skbuff.h:1322 [inline] alloc_skb_with_frags+0xcb/0x860 net/core/skbuff.c:6616 sock_alloc_send_pskb+0x858/0x990 net/core/sock.c:2897 sock_alloc_send_skb include/net/sock.h:1824 [inline] queue_oob+0xe7/0x4f0 net/unix/af_unix.c:2198 unix_stream_sendmsg+0xac1/0xbc0 net/unix/af_unix.c:2352 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x247/0x2a0 net/socket.c:744 ____sys_sendmsg+0x52a/0x840 net/socket.c:2607 ___sys_sendmsg+0x220/0x2a0 net/socket.c:2661 __sys_sendmsg net/socket.c:2690 [inline] __do_sys_sendmsg net/socket.c:2699 [inline] __se_sys_sendmsg net/socket.c:2697 [inline] __x64_sys_sendmsg+0x1eb/0x2c0 net/socket.c:2697 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 907: 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:2355 [inline] slab_free mm/slub.c:4598 [inline] kmem_cache_free+0x1f0/0x480 mm/slub.c:4700 kfree_skbmem+0x14a/0x1c0 net/core/skbuff.c:-1 __kfree_skb net/core/skbuff.c:1209 [inline] consume_skb+0xb3/0x1f0 net/core/skbuff.c:1440 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:1051 [inline] sock_recvmsg+0x216/0x270 net/socket.c:1073 sock_read_iter+0x232/0x2f0 net/socket.c:1143 new_sync_read fs/read_write.c:488 [inline] vfs_read+0x540/0xb60 fs/read_write.c:569 ksys_read+0x141/0x250 fs/read_write.c:712 __do_sys_read fs/read_write.c:722 [inline] __se_sys_read fs/read_write.c:720 [inline] __x64_sys_read+0x7f/0x90 fs/read_write.c:720 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 ffff88811bef1640 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 68 bytes inside of freed 240-byte region [ffff88811bef1640, ffff88811bef1730) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11bef1 flags: 0x4000000000000000(zone=1) page_type: f5(slab) raw: 4000000000000000 ffff888105644640 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 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 905, tgid 904 (syz.2.128), ts 57438405244, free_ts 57341067895 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x249/0x3a0 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0x3d2c/0x3dd0 mm/page_alloc.c:3511 __alloc_pages_noprof+0x23a/0x4e0 mm/page_alloc.c:4789 alloc_slab_page include/linux/sched.h:-1 [inline] allocate_slab+0xbe/0x540 mm/slub.c:2595 new_slab mm/slub.c:2649 [inline] ___slab_alloc+0x59a/0x920 mm/slub.c:3837 __slab_alloc mm/slub.c:3927 [inline] __slab_alloc_node mm/slub.c:3980 [inline] slab_alloc_node mm/slub.c:4141 [inline] kmem_cache_alloc_node_noprof+0x1f5/0x370 mm/slub.c:4205 __alloc_skb+0x143/0x340 net/core/skbuff.c:671 alloc_skb include/linux/skbuff.h:1322 [inline] alloc_skb_with_frags+0xcb/0x860 net/core/skbuff.c:6616 sock_alloc_send_pskb+0x858/0x990 net/core/sock.c:2897 sock_alloc_send_skb include/net/sock.h:1824 [inline] queue_oob+0xe7/0x4f0 net/unix/af_unix.c:2198 unix_stream_sendmsg+0xac1/0xbc0 net/unix/af_unix.c:2352 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x247/0x2a0 net/socket.c:744 ____sys_sendmsg+0x52a/0x840 net/socket.c:2607 ___sys_sendmsg+0x220/0x2a0 net/socket.c:2661 __sys_sendmsg net/socket.c:2690 [inline] __do_sys_sendmsg net/socket.c:2699 [inline] __se_sys_sendmsg net/socket.c:2697 [inline] __x64_sys_sendmsg+0x1eb/0x2c0 net/socket.c:2697 x64_sys_call+0x2a4c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:47 page last free pid 309 tgid 309 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x9d6/0xbd0 mm/page_alloc.c:2692 __free_pages+0x6b/0x1c0 mm/page_alloc.c:4876 vfree+0x31b/0x4f0 mm/vmalloc.c:3379 delayed_vfree_work+0x59/0x80 mm/vmalloc.c:3299 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0x7d5/0x1020 kernel/workqueue.c:3310 worker_thread+0x99f/0xd90 kernel/workqueue.c:3391 kthread+0x2c7/0x370 kernel/kthread.c:389 ret_from_fork+0x64/0xa0 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88811bef1580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff88811bef1600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff88811bef1680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811bef1700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88811bef1780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================