================================================================== BUG: KASAN: use-after-free in __rxrpc_put_peer net/rxrpc/peer_object.c:411 [inline] BUG: KASAN: use-after-free in rxrpc_put_peer+0x685/0x6a0 net/rxrpc/peer_object.c:435 Read of size 8 at addr ffff8880a1baf218 by task syz-executor.1/10559 CPU: 0 PID: 10559 Comm: syz-executor.1 Not tainted 5.3.0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:618 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __rxrpc_put_peer net/rxrpc/peer_object.c:411 [inline] rxrpc_put_peer+0x685/0x6a0 net/rxrpc/peer_object.c:435 rxrpc_rcu_destroy_call+0x5e/0x140 net/rxrpc/call_object.c:564 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2114 [inline] rcu_core+0x67f/0x1580 kernel/rcu/tree.c:2314 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2323 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:537 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 RIP: 0010:__tlb_remove_page_size+0x35/0x4a0 mm/mmu_gather.c:70 Code: 41 55 41 54 53 48 89 fb 48 83 ec 08 e8 44 39 d2 ff 48 8d 7b 18 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 <0f> 85 8b 03 00 00 4c 8b 63 18 31 ff 4c 89 e6 e8 b7 3a d2 ff 4d 85 RSP: 0018:ffff888058caf6f0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: ffff888058cafa00 RCX: ffffffff819d4c62 RDX: 1ffff1100b195f43 RSI: ffffffff81a04bbc RDI: ffff888058cafa18 RBP: ffff888058caf720 R08: ffff8880564a6700 R09: fffff9400054342f R10: fffff9400054342e R11: ffffea0002a1a173 R12: ffffea0002a1a140 R13: ffff888058cafa00 R14: ffffea0002a1a140 R15: dffffc0000000000 __tlb_remove_page include/asm-generic/tlb.h:414 [inline] zap_pte_range mm/memory.c:1062 [inline] zap_pmd_range mm/memory.c:1161 [inline] zap_pud_range mm/memory.c:1190 [inline] zap_p4d_range mm/memory.c:1211 [inline] unmap_page_range+0xed0/0x2170 mm/memory.c:1232 unmap_single_vma+0x19d/0x300 mm/memory.c:1277 unmap_vmas+0x135/0x280 mm/memory.c:1309 exit_mmap+0x2ba/0x530 mm/mmap.c:3145 __mmput kernel/fork.c:1064 [inline] mmput+0x179/0x4d0 kernel/fork.c:1085 exit_mm kernel/exit.c:547 [inline] do_exit+0x84e/0x2e50 kernel/exit.c:866 do_group_exit+0x135/0x360 kernel/exit.c:983 get_signal+0x47c/0x2500 kernel/signal.c:2734 do_signal+0x87/0x1700 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x286/0x380 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x5a9/0x6a0 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4598e9 Code: 24 18 0f b6 05 2f d1 3b 01 3c 01 76 0a 48 8b 6c 24 18 48 83 c4 20 c3 75 07 e8 63 08 fd ff 0f 0b c6 05 11 d1 3b 01 01 48 b8 00 <00> 00 00 00 00 f0 7f 48 89 04 24 e8 a7 dd fa ff f2 0f 10 44 24 08 RSP: 002b:00007fed4baa9cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000075bf28 RCX: 00000000004598e9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075bf28 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000075bf2c R13: 0000000000a6fb7f R14: 00007fed4baaa9c0 R15: 000000000075bf2c Allocated by task 10770: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:493 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:466 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:507 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3550 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:748 [inline] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline] rxrpc_lookup_local+0x562/0x1ba0 net/rxrpc/local_object.c:277 rxrpc_sendmsg+0x379/0x5f0 net/rxrpc/af_rxrpc.c:566 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2311 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg net/socket.c:2439 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2439 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9952: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:455 kasan_slab_free+0xe/0x10 mm/kasan/common.c:463 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 rxrpc_local_rcu+0x62/0x80 net/rxrpc/local_object.c:499 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2114 [inline] rcu_core+0x67f/0x1580 kernel/rcu/tree.c:2314 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2323 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a1baf200 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 24 bytes inside of 1024-byte region [ffff8880a1baf200, ffff8880a1baf600) The buggy address belongs to the page: page:ffffea000286eb80 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0xffff8880a1baf680 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002579088 ffffea00028c0f08 ffff8880aa400c40 raw: ffff8880a1baf680 ffff8880a1bae000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a1baf100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a1baf180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a1baf200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a1baf280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a1baf300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================