rxrpc: Leaked peer ce2 {1} 127.0.0.1:7003
==================================================================
BUG: KASAN: slab-use-after-free in rxrpc_destroy_all_peers+0xcc/0x150
Read of size 8 at addr ffff8880242a8820 by task kworker/u8:5/8531

CPU: 0 UID: 0 PID: 8531 Comm: kworker/u8:5 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: netns cleanup_net
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 rxrpc_destroy_all_peers+0xcc/0x150
 rxrpc_exit_net+0x7f/0xc0
 ops_undo_list+0x43d/0x8d0
 cleanup_net+0x572/0x810
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 6334:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x331/0x660
 rxrpc_alloc_peer+0x7d/0x330
 rxrpc_lookup_peer+0x3f7/0xa50
 rxrpc_kernel_lookup_peer+0x8e/0xc0
 afs_merge_fs_addr4+0x16c/0x640
 afs_parse_text_addrs+0x7b3/0xab0
 afs_lookup_cell+0x10fe/0x1c80
 afs_proc_cells_write+0x242/0x310
 proc_simple_write+0x10c/0x140
 proc_reg_write+0x1e9/0x2e0
 vfs_write+0x296/0xba0
 ksys_write+0x150/0x270
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 3668:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 __rcu_free_sheaf_prepare+0x12d/0x2a0
 rcu_free_sheaf+0x31/0x200
 rcu_core+0x794/0x10b0
 handle_softirqs+0x226/0x860
 __irq_exit_rcu+0xcb/0x220
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 asm_sysvec_apic_timer_interrupt+0x1a/0x20

The buggy address belongs to the object at ffff8880242a8800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 32 bytes inside of
 freed 512-byte region [ffff8880242a8800, ffff8880242a8a00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x242a8
head: order:2 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 ffff888100041c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff888100041c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x2d2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_THISNODE), pid 3165, tgid 3165 (dhcpcd-run-hook), ts 953639972849, free_ts 953563450525
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x21fe/0x2270
 __alloc_frozen_pages_noprof+0x18d/0x380
 allocate_slab+0x79/0x5e0
 ___slab_alloc+0x16a/0x950
 __kmalloc_flags_noprof+0x349/0x810
 alloc_slab_obj_exts+0x4d/0x170
 allocate_slab+0x401/0x5e0
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c3/0x6b0
 kmem_cache_alloc_noprof+0x386/0x5f0
 __anon_vma_prepare+0xc3/0x4e0
 do_pte_missing+0x3029/0x34b0
 handle_mm_fault+0x1b36/0x3080
 do_user_addr_fault+0xa4f/0x1340
 exc_page_fault+0x6a/0xc0
page last free pid 1771 tgid 1771 stack trace:
 __free_frozen_pages+0xc22/0xd20
 __slab_free+0x274/0x2c0
 qlist_free_all+0x99/0x100
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 kmem_cache_alloc_noprof+0x2a4/0x5f0
 do_getname+0x2e/0x250
 __se_sys_unlink+0x1e/0x140
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8880242a8700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880242a8780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880242a8800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                               ^
 ffff8880242a8880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880242a8900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
