================================================================== BUG: KASAN: slab-use-after-free in __sk_msg_recvmsg+0x8d3/0xf30 net/core/skmsg.c:455 Read of size 4 at addr ffff888029ed4828 by task syz.0.1243/10899 CPU: 1 UID: 0 PID: 10899 Comm: syz.0.1243 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 __sk_msg_recvmsg+0x8d3/0xf30 net/core/skmsg.c:455 udp_bpf_recvmsg+0x18b/0xa90 net/ipv4/udp_bpf.c:83 sock_recvmsg_nosec net/socket.c:1128 [inline] sock_recvmsg+0x155/0x1b0 net/socket.c:1148 ____sys_recvmsg+0x1e6/0x4a0 net/socket.c:2904 ___sys_recvmsg+0x213/0x5a0 net/socket.c:2946 do_recvmmsg+0x31a/0x7f0 net/socket.c:3041 __sys_recvmmsg net/socket.c:3115 [inline] __do_sys_recvmmsg net/socket.c:3138 [inline] __se_sys_recvmmsg net/socket.c:3131 [inline] __x64_sys_recvmmsg+0x198/0x250 net/socket.c:3131 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1cee19ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1cef10a028 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f1cee416090 RCX: 00007f1cee19ce59 RDX: 0000000000000012 RSI: 0000200000000400 RDI: 0000000000000003 RBP: 00007f1cee232e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000040000021 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1cee416128 R14: 00007f1cee416090 R15: 00007ffe410eaf08 Allocated by task 10898: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x318/0x660 mm/slub.c:5451 _kmalloc_noprof include/linux/slab.h:969 [inline] _kzalloc_noprof include/linux/slab.h:1286 [inline] alloc_sk_msg net/core/skmsg.c:526 [inline] sk_psock_skb_ingress_self+0x5e/0x320 net/core/skmsg.c:628 sk_psock_verdict_apply net/core/skmsg.c:1028 [inline] sk_psock_verdict_recv+0xca9/0xeb0 net/core/skmsg.c:1222 udp_read_skb+0x5f4/0x6d0 net/ipv4/udp.c:2022 sk_psock_verdict_data_ready+0x25f/0x690 net/core/skmsg.c:1247 __udp_enqueue_schedule_skb+0xc26/0x12d0 net/ipv4/udp.c:1745 __udp_queue_rcv_skb net/ipv4/udp.c:2319 [inline] udp_queue_rcv_one_skb+0x750/0x10e0 net/ipv4/udp.c:2410 __udp4_lib_mcast_deliver+0xace/0xb60 net/ipv4/udp.c:2522 udp_rcv+0xd3e/0x1db0 net/ipv4/udp.c:2647 ip_protocol_deliver_rcu+0x27e/0x440 net/ipv4/ip_input.c:207 ip_local_deliver_finish+0x3bb/0x6f0 net/ipv4/ip_input.c:241 NF_HOOK+0x336/0x3c0 include/linux/netfilter.h:318 dst_input include/net/dst.h:481 [inline] ip_sublist_rcv_finish+0x1f0/0x240 net/ipv4/ip_input.c:623 ip_list_rcv_finish net/ipv4/ip_input.c:667 [inline] ip_sublist_rcv+0x5cc/0xa70 net/ipv4/ip_input.c:683 ip_list_rcv+0x3ec/0x440 net/ipv4/ip_input.c:717 __netif_receive_skb_list_ptype net/core/dev.c:6250 [inline] __netif_receive_skb_list_core+0x804/0x830 net/core/dev.c:6296 __netif_receive_skb_list net/core/dev.c:6348 [inline] netif_receive_skb_list_internal+0x995/0xcf0 net/core/dev.c:6439 netif_receive_skb_list+0x55/0x450 net/core/dev.c:6491 xdp_recv_frames net/bpf/test_run.c:268 [inline] xdp_test_run_batch net/bpf/test_run.c:349 [inline] bpf_test_run_xdp_live+0x1875/0x1c20 net/bpf/test_run.c:378 bpf_prog_test_run_xdp+0x7d8/0x11d0 net/bpf/test_run.c:1429 bpf_prog_test_run+0x2c5/0x340 kernel/bpf/syscall.c:4742 __sys_bpf+0x643/0x950 kernel/bpf/syscall.c:6292 __do_sys_bpf kernel/bpf/syscall.c:6387 [inline] __se_sys_bpf kernel/bpf/syscall.c:6385 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6385 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 10903: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2700 [inline] slab_free mm/slub.c:6310 [inline] kfree+0x1c5/0x640 mm/slub.c:6625 kfree_sk_msg include/linux/skmsg.h:425 [inline] __sk_msg_recvmsg+0xd2d/0xf30 net/core/skmsg.c:492 udp_bpf_recvmsg+0x18b/0xa90 net/ipv4/udp_bpf.c:83 sock_recvmsg_nosec net/socket.c:1128 [inline] sock_recvmsg+0x155/0x1b0 net/socket.c:1148 ____sys_recvmsg+0x1e6/0x4a0 net/socket.c:2904 ___sys_recvmsg+0x213/0x5a0 net/socket.c:2946 do_recvmmsg+0x31a/0x7f0 net/socket.c:3041 __sys_recvmmsg net/socket.c:3115 [inline] __do_sys_recvmmsg net/socket.c:3138 [inline] __se_sys_recvmmsg net/socket.c:3131 [inline] __x64_sys_recvmmsg+0x198/0x250 net/socket.c:3131 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888029ed4800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 40 bytes inside of freed 1024-byte region [ffff888029ed4800, ffff888029ed4c00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29ed0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813fe1bdc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813fe1bdc0 dead000000000100 dead000000000122 head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000 head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5630, tgid 5630 (syz-executor), ts 59413876295, free_ts 59382464570 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x22d/0x280 mm/page_alloc.c:1853 prep_new_page mm/page_alloc.c:1861 [inline] get_page_from_freelist+0x24ae/0x2530 mm/page_alloc.c:3941 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5221 alloc_slab_page mm/slub.c:3289 [inline] allocate_slab+0x74/0x5d0 mm/slub.c:3404 new_slab mm/slub.c:3447 [inline] refill_objects+0x328/0x3c0 mm/slub.c:7241 refill_sheaf mm/slub.c:2827 [inline] __pcs_replace_empty_main+0x2e0/0x6b0 mm/slub.c:4692 alloc_from_pcs mm/slub.c:4790 [inline] slab_alloc_node mm/slub.c:4924 [inline] __do_kmalloc_node mm/slub.c:5333 [inline] __kmalloc_noprof+0x464/0x750 mm/slub.c:5347 _kmalloc_noprof include/linux/slab.h:973 [inline] _kzalloc_noprof include/linux/slab.h:1286 [inline] ipt_alloc_initial_table+0x6b/0x6a0 net/ipv4/netfilter/ip_tables.c:36 iptable_security_table_init+0x1b/0x70 net/ipv4/netfilter/iptable_security.c:43 xt_find_table_lock+0x311/0x400 net/netfilter/x_tables.c:1353 xt_request_find_table_lock+0x26/0x100 net/netfilter/x_tables.c:1378 get_info net/ipv4/netfilter/ip_tables.c:961 [inline] do_ipt_get_ctl+0x77f/0x1300 net/ipv4/netfilter/ip_tables.c:1660 nf_getsockopt+0x26e/0x290 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x19e/0x230 net/ipv4/ip_sockglue.c:1777 do_sock_getsockopt+0x51d/0x7e0 net/socket.c:2474 __sys_getsockopt net/socket.c:2505 [inline] __do_sys_getsockopt net/socket.c:2512 [inline] __se_sys_getsockopt net/socket.c:2509 [inline] __x64_sys_getsockopt+0x1a4/0x240 net/socket.c:2509 page last free pid 5832 tgid 5831 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1397 [inline] __free_frozen_pages+0xc0d/0xd20 mm/page_alloc.c:2938 __slab_free+0x274/0x2c0 mm/slub.c:5672 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4610 [inline] slab_alloc_node mm/slub.c:4939 [inline] kmem_cache_alloc_noprof+0x2b8/0x650 mm/slub.c:4946 taskstats_tgid_alloc kernel/taskstats.c:576 [inline] taskstats_exit+0x376/0xac0 kernel/taskstats.c:615 do_exit+0x6ad/0x2360 kernel/exit.c:974 do_group_exit+0x22d/0x2f0 kernel/exit.c:1147 get_signal+0x121b/0x12c0 kernel/signal.c:3038 arch_do_signal_or_restart+0xbb/0x860 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop+0x104/0x730 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x353/0x580 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888029ed4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029ed4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888029ed4800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888029ed4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888029ed4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================