================================================================== BUG: KFENCE: use-after-free read in cleanup_bearer+0x1e4/0x280 net/tipc/udp_media.c:820 Use-after-free read at 0xffff88823bf78a98 (in kfence-#187): cleanup_bearer+0x1e4/0x280 net/tipc/udp_media.c:820 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa68/0x1840 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 kfence-#187: 0xffff88823bf78a80-0xffff88823bf78fff, size=1408, cache=sock_inode_cache allocated by task 7880 on cpu 0 at 258.798946s (26.800283s ago): sock_alloc_inode+0x28/0xc0 net/socket.c:307 alloc_inode+0x67/0x1a0 fs/inode.c:336 sock_alloc net/socket.c:615 [inline] __sock_create+0x127/0xa30 net/socket.c:1522 udp_sock_create4+0xda/0x670 net/ipv4/udp_tunnel_core.c:18 tipc_udp_enable+0xf6c/0x1810 net/tipc/udp_media.c:770 tipc_enable_bearer net/tipc/bearer.c:331 [inline] __tipc_nl_bearer_enable+0xb0d/0x12f0 net/tipc/bearer.c:1047 tipc_nl_bearer_enable+0x22/0x40 net/tipc/bearer.c:1056 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0xb16/0xec0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x1e5/0x430 net/netlink/af_netlink.c:2542 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x7f8/0x990 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x223/0x270 net/socket.c:726 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2583 ___sys_sendmsg net/socket.c:2637 [inline] __sys_sendmsg+0x269/0x350 net/socket.c:2669 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f freed by task 16 on cpu 0 at 285.527665s (0.169519s ago): rcu_do_batch kernel/rcu/tree.c:2567 [inline] rcu_core+0xaac/0x17a0 kernel/rcu/tree.c:2823 handle_softirqs+0x2d6/0x9b0 kernel/softirq.c:554 run_ksoftirqd+0xca/0x130 kernel/softirq.c:943 smpboot_thread_fn+0x546/0xa30 kernel/smpboot.c:164 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 CPU: 0 UID: 0 PID: 5966 Comm: kworker/0:7 Not tainted 6.13.0-rc1-syzkaller-00316-gb5f217084ab3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events cleanup_bearer RIP: 0010:cleanup_bearer+0x1e4/0x280 net/tipc/udp_media.c:820 Code: 2b 00 74 08 48 89 ef e8 7a dd 9a f6 48 8b 5d 00 48 83 c3 18 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 5c dd 9a f6 <48> 8b 1b 48 83 c3 30 e8 d0 f2 60 00 48 89 d8 48 c1 e8 03 42 80 3c RSP: 0018:ffffc90004167b70 EFLAGS: 00010246 RAX: 1ffff110477ef153 RBX: ffff88823bf78a98 RCX: 0000000000000001 RDX: dffffc0000000000 RSI: ffffffff8c0a9680 RDI: 0000000000000001 RBP: ffff888030f50108 R08: ffffffff942b8977 R09: 1ffffffff285712e R10: dffffc0000000000 R11: fffffbfff285712f R12: ffff888029f1fe80 R13: dffffc0000000000 R14: dffffc0000000000 R15: ffff888030f50118 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88823bf78a98 CR3: 000000005bf22000 CR4: 0000000000350ef0 Call Trace: process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa68/0x1840 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 ================================================================== ---------------- Code disassembly (best guess): 0: 2b 00 sub (%rax),%eax 2: 74 08 je 0xc 4: 48 89 ef mov %rbp,%rdi 7: e8 7a dd 9a f6 call 0xf69add86 c: 48 8b 5d 00 mov 0x0(%rbp),%rbx 10: 48 83 c3 18 add $0x18,%rbx 14: 48 89 d8 mov %rbx,%rax 17: 48 c1 e8 03 shr $0x3,%rax 1b: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1) 20: 74 08 je 0x2a 22: 48 89 df mov %rbx,%rdi 25: e8 5c dd 9a f6 call 0xf69add86 * 2a: 48 8b 1b mov (%rbx),%rbx <-- trapping instruction 2d: 48 83 c3 30 add $0x30,%rbx 31: e8 d0 f2 60 00 call 0x60f306 36: 48 89 d8 mov %rbx,%rax 39: 48 c1 e8 03 shr $0x3,%rax 3d: 42 rex.X 3e: 80 .byte 0x80 3f: 3c .byte 0x3c