syzbot


KASAN: slab-use-after-free Read in __sk_msg_recvmsg

Status: upstream: reported C repro on 2026/04/02 00:49
Subsystems: net bpf
[Documentation on labels]
Reported-by: syzbot+431f9a9e3f5227fbb904@syzkaller.appspotmail.com
First crash: 97d, last: 3d12h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
a86997dd-8959-444f-b653-afe66ca990b3 repro 💥 KASAN: slab-use-after-free Read in __sk_msg_recvmsg 2026/03/10 12:17 2026/03/10 12:17 2026/03/10 12:17 5c03941b7fba0fd3b0326afc981322c89fe9ba52+ failed to run ["git" "pull" "origin" "HEAD" "--depth=1" "--allow-unrelated-histories"]: exit status 1
Cause bisection: failed (error log, bisect log)
  
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] Monthly bpf report (May 2026) 0 (1) 2026/05/18 04:32
[PATCH] udp_bpf: fix use-after-free in udp_bpf_recvmsg() 4 (4) 2026/04/02 17:23
[syzbot] [net?] [bpf?] KASAN: slab-use-after-free Read in __sk_msg_recvmsg 0 (3) 2026/04/02 04:28
Last patch testing requests (4)
Created Duration User Patch Repo Result
2026/04/15 04:16 21m retest repro net-next report log
2026/04/15 04:16 16m retest repro net-next report log
2026/04/02 04:28 24m kartikey406@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main report log
2026/04/02 02:16 1h22m kartikey406@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main report log

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in __sk_msg_recvmsg+0x197/0xfc0 net/core/skmsg.c:431
Read of size 8 at addr ffff88803492aab0 by task syz.0.21/5897

CPU: 1 UID: 0 PID: 5897 Comm: syz.0.21 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <TASK>
 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+0x197/0xfc0 net/core/skmsg.c:431
 udp_bpf_recvmsg+0x196/0xac0 net/ipv4/udp_bpf.c:83
 sock_recvmsg_nosec net/socket.c:1137 [inline]
 sock_recvmsg+0x155/0x1b0 net/socket.c:1159
 ____sys_recvmsg+0x1e6/0x4a0 net/socket.c:2918
 ___sys_recvmsg+0x215/0x590 net/socket.c:2960
 do_recvmmsg+0x334/0x800 net/socket.c:3055
 __sys_recvmmsg net/socket.c:3129 [inline]
 __do_sys_recvmmsg net/socket.c:3152 [inline]
 __se_sys_recvmmsg net/socket.c:3145 [inline]
 __x64_sys_recvmmsg+0x198/0x250 net/socket.c:3145
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f70ebb9ce59
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:00007f70ec9a0028 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f70ebe16090 RCX: 00007f70ebb9ce59
RDX: 0000000000000002 RSI: 0000200000003fc0 RDI: 0000000000000003
RBP: 00007f70ebc32d6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000010021 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f70ebe16128 R14: 00007f70ebe16090 R15: 00007ffe124d1d88
 </TASK>

Allocated by task 5896:
 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+0x31c/0x660 mm/slub.c:5419
 kmalloc_noprof include/linux/slab.h:950 [inline]
 kzalloc_noprof include/linux/slab.h:1188 [inline]
 alloc_sk_msg net/core/skmsg.c:525 [inline]
 sk_psock_skb_ingress_self+0x5e/0x370 net/core/skmsg.c:627
 sk_psock_verdict_apply net/core/skmsg.c:1062 [inline]
 sk_psock_verdict_recv+0x7d9/0x8d0 net/core/skmsg.c:1260
 udp_read_skb+0x5d9/0x6b0 net/ipv4/udp.c:2014
 sk_psock_verdict_data_ready+0x25f/0x690 net/core/skmsg.c:1284
 __udp_enqueue_schedule_skb+0xc4b/0x12e0 net/ipv4/udp.c:1745
 __udp_queue_rcv_skb net/ipv4/udp.c:2311 [inline]
 udp_queue_rcv_one_skb+0x755/0x10f0 net/ipv4/udp.c:2402
 __udp4_lib_mcast_deliver+0xad7/0xb70 net/ipv4/udp.c:2514
 udp_rcv+0xcd0/0x1db0 net/ipv4/udp.c:2639
 ip_protocol_deliver_rcu+0x282/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:480 [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+0x5c6/0xa70 net/ipv4/ip_input.c:683
 ip_list_rcv+0x3f1/0x450 net/ipv4/ip_input.c:717
 __netif_receive_skb_list_ptype net/core/dev.c:6245 [inline]
 __netif_receive_skb_list_core+0x7e5/0x810 net/core/dev.c:6292
 __netif_receive_skb_list net/core/dev.c:6344 [inline]
 netif_receive_skb_list_internal+0x995/0xcf0 net/core/dev.c:6435
 netif_receive_skb_list+0x55/0x450 net/core/dev.c:6487
 xdp_recv_frames net/bpf/test_run.c:269 [inline]
 xdp_test_run_batch net/bpf/test_run.c:350 [inline]
 bpf_test_run_xdp_live+0x1946/0x1cf0 net/bpf/test_run.c:379
 bpf_prog_test_run_xdp+0x81c/0x1160 net/bpf/test_run.c:1430
 bpf_prog_test_run+0x2c7/0x340 kernel/bpf/syscall.c:4742
 __sys_bpf+0x643/0x950 kernel/bpf/syscall.c:6266
 __do_sys_bpf kernel/bpf/syscall.c:6361 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:6359 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6359
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 5898:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/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:2689 [inline]
 slab_free mm/slub.c:6250 [inline]
 kfree+0x1c5/0x640 mm/slub.c:6565
 kfree_sk_msg include/linux/skmsg.h:418 [inline]
 __sk_msg_recvmsg+0xdb7/0xfc0 net/core/skmsg.c:491
 udp_bpf_recvmsg+0x196/0xac0 net/ipv4/udp_bpf.c:83
 sock_recvmsg_nosec net/socket.c:1137 [inline]
 sock_recvmsg+0x155/0x1b0 net/socket.c:1159
 ____sys_recvmsg+0x1e6/0x4a0 net/socket.c:2918
 ___sys_recvmsg+0x215/0x590 net/socket.c:2960
 do_recvmmsg+0x334/0x800 net/socket.c:3055
 __sys_recvmmsg net/socket.c:3129 [inline]
 __do_sys_recvmmsg net/socket.c:3152 [inline]
 __se_sys_recvmmsg net/socket.c:3145 [inline]
 __x64_sys_recvmmsg+0x198/0x250 net/socket.c:3145
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88803492a800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 688 bytes inside of
 freed 1024-byte region [ffff88803492a800, ffff88803492ac00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x34928
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 ffff88813fe20dc0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813fe20dc0 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 80, tgid 80 (kworker/u8:5), ts 93535996970, free_ts 93431323536
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
 prep_new_page mm/page_alloc.c:1866 [inline]
 get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
 alloc_slab_page mm/slub.c:3278 [inline]
 allocate_slab+0x77/0x660 mm/slub.c:3467
 new_slab mm/slub.c:3525 [inline]
 refill_objects+0x339/0x3d0 mm/slub.c:7255
 refill_sheaf mm/slub.c:2816 [inline]
 __pcs_replace_empty_main+0x321/0x720 mm/slub.c:4651
 alloc_from_pcs mm/slub.c:4749 [inline]
 slab_alloc_node mm/slub.c:4883 [inline]
 __do_kmalloc_node mm/slub.c:5294 [inline]
 __kmalloc_noprof+0x474/0x760 mm/slub.c:5307
 kmalloc_noprof include/linux/slab.h:954 [inline]
 kzalloc_noprof include/linux/slab.h:1188 [inline]
 neigh_alloc net/core/neighbour.c:521 [inline]
 ___neigh_create+0x6d5/0x2250 net/core/neighbour.c:655
 ip6_finish_output2+0x729/0x13e0 net/ipv6/ip6_output.c:128
 NF_HOOK_COND include/linux/netfilter.h:307 [inline]
 ip6_output+0x340/0x550 net/ipv6/ip6_output.c:246
 dst_output include/net/dst.h:470 [inline]
 NF_HOOK include/linux/netfilter.h:318 [inline]
 ndisc_send_skb+0xd0b/0x1670 net/ipv6/ndisc.c:512
 addrconf_dad_completed+0x909/0xe60 net/ipv6/addrconf.c:4372
 addrconf_dad_work+0xc5e/0x14c0 net/ipv6/addrconf.c:-1
 process_one_work kernel/workqueue.c:3314 [inline]
 process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3478
 kthread+0x389/0x470 kernel/kthread.c:436
page last free pid 5772 tgid 5772 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1402 [inline]
 __free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2943
 __slab_free+0x274/0x2c0 mm/slub.c:5612
 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:4569 [inline]
 slab_alloc_node mm/slub.c:4898 [inline]
 __do_kmalloc_node mm/slub.c:5294 [inline]
 __kmalloc_noprof+0x316/0x760 mm/slub.c:5307
 kmalloc_noprof include/linux/slab.h:954 [inline]
 tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251
 tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
 tomoyo_path_perm+0x283/0x560 security/tomoyo/file.c:827
 security_inode_getattr+0x12b/0x310 security/security.c:1895
 vfs_getattr fs/stat.c:259 [inline]
 vfs_fstat fs/stat.c:281 [inline]
 __do_sys_newfstat fs/stat.c:551 [inline]
 __se_sys_newfstat fs/stat.c:546 [inline]
 __x64_sys_newfstat+0x13b/0x270 fs/stat.c:546
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88803492a980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88803492aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88803492aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                     ^
 ffff88803492ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88803492ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/16 06:54 net-next 55834f0d7421 81fb92f3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/04/30 08:35 net-next f48bf6145116 005438fc .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/04/24 16:20 net-next e728258debd5 1c2b9291 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/04/01 01:09 net-next 93d04e76bcf1 aeea1c72 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/05/14 07:38 net 59afae20080a 6ccb967e .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/03/25 00:21 net-next a4b908c89d88 74e70d19 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/05/13 08:54 upstream c21b90f77687 a0949470 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/04/24 18:48 upstream dd6c438c3e64 629ff21a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/02/11 11:35 upstream 192c0159402e 75707236 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/04/22 08:19 net 478ed6b7d257 0b6ab7ec .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/03/31 22:16 net-next 93d04e76bcf1 aeea1c72 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
2026/03/24 22:42 net-next a4b908c89d88 74e70d19 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in __sk_msg_recvmsg
* Struck through repros no longer work on HEAD.