==================================================================
BUG: KASAN: slab-use-after-free in cleanup_bearer+0x1b0/0x298 net/tipc/udp_media.c:820
Read of size 8 at addr ffff0000db707218 by task kworker/0:3/6421

CPU: 0 UID: 0 PID: 6421 Comm: kworker/0:3 Not tainted 6.13.0-rc2-syzkaller-g2e7aff49b5da #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events cleanup_bearer
Call trace:
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C)
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0x198/0x538 mm/kasan/report.c:489
 kasan_report+0xd8/0x138 mm/kasan/report.c:602
 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381
 cleanup_bearer+0x1b0/0x298 net/tipc/udp_media.c:820
 process_one_work+0x7a8/0x15cc kernel/workqueue.c:3229
 process_scheduled_works kernel/workqueue.c:3310 [inline]
 worker_thread+0x97c/0xeec kernel/workqueue.c:3391
 kthread+0x288/0x310 kernel/kthread.c:389
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862

Allocated by task 8371:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x40/0x78 mm/kasan/common.c:68
 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:568
 unpoison_slab_object mm/kasan/common.c:319 [inline]
 __kasan_slab_alloc+0x74/0x8c 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_lru_noprof+0x258/0x414 mm/slub.c:4172
 sock_alloc_inode+0x2c/0xcc net/socket.c:307
 alloc_inode+0x68/0x19c fs/inode.c:336
 new_inode_pseudo+0x20/0x30 fs/inode.c:1174
 sock_alloc net/socket.c:615 [inline]
 __sock_create+0x134/0x908 net/socket.c:1522
 sock_create_kern+0x4c/0x64 net/socket.c:1634
 udp_sock_create4+0xd4/0x5a4 net/ipv4/udp_tunnel_core.c:18
 udp_sock_create+0x94/0xc0 include/net/udp_tunnel.h:59
 tipc_udp_enable+0xb60/0x1298 net/tipc/udp_media.c:770
 tipc_enable_bearer net/tipc/bearer.c:331 [inline]
 __tipc_nl_bearer_enable+0x960/0xf94 net/tipc/bearer.c:1047
 tipc_nl_bearer_enable+0x2c/0x48 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+0x888/0xbb0 net/netlink/genetlink.c:1210
 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2542
 genl_rcv+0x38/0x50 net/netlink/genetlink.c:1219
 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline]
 netlink_unicast+0x668/0x8a4 net/netlink/af_netlink.c:1347
 netlink_sendmsg+0x7a4/0xa8c net/netlink/af_netlink.c:1891
 sock_sendmsg_nosec net/socket.c:711 [inline]
 __sock_sendmsg net/socket.c:726 [inline]
 ____sys_sendmsg+0x56c/0x840 net/socket.c:2583
 ___sys_sendmsg net/socket.c:2637 [inline]
 __sys_sendmsg+0x238/0x304 net/socket.c:2669
 __do_sys_sendmsg net/socket.c:2674 [inline]
 __se_sys_sendmsg net/socket.c:2672 [inline]
 __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2672
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744
 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600

Freed by task 16:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x40/0x78 mm/kasan/common.c:68
 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:582
 poison_slab_object mm/kasan/common.c:247 [inline]
 __kasan_slab_free+0x64/0x8c mm/kasan/common.c:264
 kasan_slab_free include/linux/kasan.h:233 [inline]
 slab_free_hook mm/slub.c:2338 [inline]
 slab_free mm/slub.c:4598 [inline]
 kmem_cache_free+0x198/0x554 mm/slub.c:4700
 sock_free_inode+0x28/0x38 net/socket.c:328
 i_callback+0x50/0x78 fs/inode.c:325
 rcu_do_batch kernel/rcu/tree.c:2567 [inline]
 rcu_core+0x898/0x1b5c kernel/rcu/tree.c:2823
 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2840
 handle_softirqs+0x320/0xd34 kernel/softirq.c:554
 run_ksoftirqd+0x70/0xc0 kernel/softirq.c:943
 smpboot_thread_fn+0x4b0/0x90c kernel/smpboot.c:164
 kthread+0x288/0x310 kernel/kthread.c:389
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862

Last potentially related work creation:
 kasan_save_stack+0x40/0x6c mm/kasan/common.c:47
 __kasan_record_aux_stack+0xb8/0xd0 mm/kasan/generic.c:544
 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:554
 __call_rcu_common kernel/rcu/tree.c:3086 [inline]
 call_rcu+0x104/0xb00 kernel/rcu/tree.c:3190
 destroy_inode fs/inode.c:391 [inline]
 evict+0x7b4/0x978 fs/inode.c:827
 iput_final fs/inode.c:1946 [inline]
 iput+0x740/0x8e8 fs/inode.c:1972
 __sock_release net/socket.c:652 [inline]
 sock_release+0x110/0x140 net/socket.c:668
 udp_tunnel_sock_release+0x74/0x88 net/ipv4/udp_tunnel_core.c:182
 cleanup_bearer+0x180/0x298 net/tipc/udp_media.c:818
 process_one_work+0x7a8/0x15cc kernel/workqueue.c:3229
 process_scheduled_works kernel/workqueue.c:3310 [inline]
 worker_thread+0x97c/0xeec kernel/workqueue.c:3391
 kthread+0x288/0x310 kernel/kthread.c:389
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862

The buggy address belongs to the object at ffff0000db707200
 which belongs to the cache sock_inode_cache of size 1408
The buggy address is located 24 bytes inside of
 freed 1408-byte region [ffff0000db707200, ffff0000db707780)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11b700
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff0000d3e95001
ksm flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 05ffc00000000040 ffff0000c1be5c80 fffffdffc3df5200 dead000000000003
raw: 0000000000000000 0000000000150015 00000001f5000000 ffff0000d3e95001
head: 05ffc00000000040 ffff0000c1be5c80 fffffdffc3df5200 dead000000000003
head: 0000000000000000 0000000000150015 00000001f5000000 ffff0000d3e95001
head: 05ffc00000000003 fffffdffc36dc001 ffffffffffffffff 0000000000000000
head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000db707100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff0000db707180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000db707200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                            ^
 ffff0000db707280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff0000db707300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
Unable to handle kernel paging request at virtual address dfff800000000006
KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037]
Mem abort info:
  ESR = 0x0000000096000005
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x05: level 1 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
  CM = 0, WnR = 0, TnD = 0, TagAccess = 0
  GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000006] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 UID: 0 PID: 6421 Comm: kworker/0:3 Tainted: G    B              6.13.0-rc2-syzkaller-g2e7aff49b5da #0
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events cleanup_bearer
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : read_pnet include/net/net_namespace.h:392 [inline]
pc : sock_net include/net/sock.h:655 [inline]
pc : cleanup_bearer+0x1c0/0x298 net/tipc/udp_media.c:820
lr : read_pnet include/net/net_namespace.h:392 [inline]
lr : sock_net include/net/sock.h:655 [inline]
lr : cleanup_bearer+0x1bc/0x298 net/tipc/udp_media.c:820
sp : ffff8000a3a87aa0
x29: ffff8000a3a87aa0 x28: ffff80008f97d600 x27: 1fffe000185fc3ca
x26: ffff0000c1080008 x25: ffff0000c2fe2244 x24: dfff800000000000
x23: ffff0000c2fe1e40 x22: ffff0000d9d6b718
 x21: 1fffe0001b3ad6e1

x20: 0000000000000030 x19: ffff0000d9d6b718 x18: 1fffe000366c167e
x17: ffff80008f97d000 x16: ffff80008b6892e0 x15: 0000000000000001
x14: 1ffff000125cfaf0 x13: 0000000000000000 x12: 0000000000000000
x11: ffff7000125cfaf1 x10: 0000000000ff0100 x9 : 0000000000000000
x8 : 0000000000000006 x7 : 1fffe000366c167f x6 : ffff8000803ce76c
x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff8000802f42d0
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 read_pnet include/net/net_namespace.h:392 [inline] (P)
 sock_net include/net/sock.h:655 [inline] (P)
 cleanup_bearer+0x1c0/0x298 net/tipc/udp_media.c:820 (P)
 read_pnet include/net/net_namespace.h:392 [inline] (L)
 sock_net include/net/sock.h:655 [inline] (L)
 cleanup_bearer+0x1bc/0x298 net/tipc/udp_media.c:820 (L)
 process_one_work+0x7a8/0x15cc kernel/workqueue.c:3229
 process_scheduled_works kernel/workqueue.c:3310 [inline]
 worker_thread+0x97c/0xeec kernel/workqueue.c:3391
 kthread+0x288/0x310 kernel/kthread.c:389
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862
Code: f9400288 9100c114 9414cacf d343fe88 (38786908) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	f9400288 	ldr	x8, [x20]
   4:	9100c114 	add	x20, x8, #0x30
   8:	9414cacf 	bl	0x532b44
   c:	d343fe88 	lsr	x8, x20, #3
* 10:	38786908 	ldrb	w8, [x8, x24] <-- trapping instruction