================================================================== BUG: KASAN: use-after-free in rxrpc_local_cmp_key net/rxrpc/local_object.c:53 [inline] BUG: KASAN: use-after-free in rxrpc_lookup_local+0x5b8/0x1710 net/rxrpc/local_object.c:224 Read of size 2 at addr ffff888075833a1c by task syz-executor.2/25538 CPU: 0 PID: 25538 Comm: syz-executor.2 Not tainted 6.1.0-syzkaller-13872-gb6bb9676f216 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x220 mm/kasan/report.c:417 kasan_report+0x139/0x170 mm/kasan/report.c:517 rxrpc_local_cmp_key net/rxrpc/local_object.c:53 [inline] rxrpc_lookup_local+0x5b8/0x1710 net/rxrpc/local_object.c:224 rxrpc_sendmsg+0x47d/0x8d0 net/rxrpc/af_rxrpc.c:543 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0x597/0x8e0 net/socket.c:2476 ___sys_sendmsg net/socket.c:2530 [inline] __sys_sendmsg+0x28e/0x390 net/socket.c:2559 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1e4708c0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1e47e20168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f1e471abf80 RCX: 00007f1e4708c0d9 RDX: 000000002004c0c0 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00007f1e470e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff5384d0df R14: 00007f1e47e20300 R15: 0000000000022000 Allocated by task 24354: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0xaf/0x190 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] kzalloc include/linux/slab.h:720 [inline] ieee802_11_parse_elems_full+0xff/0x2ad0 net/mac80211/util.c:1655 ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2260 [inline] ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2267 [inline] ieee80211_bss_info_update+0x945/0x1030 net/mac80211/scan.c:212 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline] ieee80211_ibss_rx_queued_mgmt+0x19a8/0x2d00 net/mac80211/ibss.c:1638 ieee80211_iface_process_skb net/mac80211/iface.c:1581 [inline] ieee80211_iface_work+0x773/0xcf0 net/mac80211/iface.c:1635 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:488 __call_rcu_common kernel/rcu/tree.c:2753 [inline] call_rcu+0x163/0xab0 kernel/rcu/tree.c:2866 rxrpc_clean_up_connection+0x316/0x380 net/rxrpc/conn_object.c:318 rxrpc_discard_expired_client_conns+0x39b/0x4d0 net/rxrpc/conn_client.c:1059 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:488 insert_work+0x54/0x3e0 kernel/workqueue.c:1358 __queue_work+0xaaa/0xd60 kernel/workqueue.c:1517 queue_work_on+0x137/0x240 kernel/workqueue.c:1545 ops_exit_list net/core/net_namespace.c:169 [inline] setup_net+0xa0d/0xd80 net/core/net_namespace.c:356 copy_net_ns+0x34c/0x5a0 net/core/net_namespace.c:483 create_new_namespaces+0x4db/0x8e0 kernel/nsproxy.c:110 copy_namespaces+0x34b/0x3c0 kernel/nsproxy.c:179 copy_process+0x1937/0x3ec0 kernel/fork.c:2269 kernel_clone+0x227/0x640 kernel/fork.c:2681 __do_sys_clone3 kernel/fork.c:2980 [inline] __se_sys_clone3+0x372/0x410 kernel/fork.c:2964 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888075833800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 540 bytes inside of 1024-byte region [ffff888075833800, ffff888075833c00) The buggy address belongs to the physical page: page:ffffea0001d60c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888075832000 pfn:0x75830 head:ffffea0001d60c00 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012841dc0 ffffea0001f8ee10 ffffea0001d52010 raw: ffff888075832000 000000000010000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5056, tgid 5050 (syz-fuzzer), ts 111848816351, free_ts 111539473803 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 alloc_slab_page+0xbd/0x190 mm/slub.c:1851 allocate_slab+0x5e/0x3c0 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0x7f4/0xeb0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x25b/0x340 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x9c/0x190 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0x12c/0x2c0 net/core/skbuff.c:565 alloc_skb include/linux/skbuff.h:1270 [inline] __tcp_send_ack+0x98/0x5f0 net/ipv4/tcp_output.c:3957 tcp_cleanup_rbuf net/ipv4/tcp.c:1628 [inline] tcp_recvmsg_locked+0x1cf8/0x25f0 net/ipv4/tcp.c:2649 tcp_recvmsg+0x22b/0x8b0 net/ipv4/tcp.c:2679 inet_recvmsg+0x13a/0x250 net/ipv4/af_inet.c:861 sock_recvmsg_nosec net/socket.c:995 [inline] sock_recvmsg net/socket.c:1013 [inline] sock_read_iter+0x3fa/0x530 net/socket.c:1086 call_read_iter include/linux/fs.h:2180 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x7cf/0xbc0 fs/read_write.c:470 ksys_read+0x19b/0x2c0 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x751/0x780 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x19/0x4c0 mm/page_alloc.c:3464 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x156/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:761 [inline] slab_alloc_node mm/slub.c:3452 [inline] kmem_cache_alloc_node+0x1dc/0x390 mm/slub.c:3497 __alloc_skb+0xd7/0x2c0 net/core/skbuff.c:552 alloc_skb_fclone include/linux/skbuff.h:1320 [inline] tcp_stream_alloc_skb+0x3c/0x300 net/ipv4/tcp.c:862 tcp_sendmsg_locked+0xdcf/0x41e0 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1483 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x3d4/0x540 net/socket.c:1108 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7b5/0xbb0 fs/read_write.c:584 ksys_write+0x19b/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888075833900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888075833980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888075833a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888075833a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888075833b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================