================================================================== 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 ffff88808af8d218 by task syz-executor.4/8673 CPU: 0 PID: 8673 Comm: syz-executor.4 Not tainted 5.3.0-rc7+ #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:566 __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:1133 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline] RIP: 0010:lock_acquire+0x20b/0x410 kernel/locking/lockdep.c:4415 Code: 8c 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 d3 01 00 00 48 83 3d 81 30 9a 07 00 0f 84 53 01 00 00 48 8b 7d c8 57 9d <0f> 1f 44 00 00 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 65 8b RSP: 0018:ffff88806d2878c0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff11e5e8a RBX: ffff88806d278400 RCX: ffffffff81587502 RDX: dffffc0000000000 RSI: 0000000000000008 RDI: 0000000000000286 RBP: ffff88806d287908 R08: 00000000000019d0 R09: fffffbfff14e9551 R10: ffff88806d278cb8 R11: ffff88806d278400 R12: ffff8880932c4c88 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 __might_fault mm/memory.c:4441 [inline] __might_fault+0x15e/0x1e0 mm/memory.c:4426 _copy_to_user+0x30/0x160 lib/usercopy.c:25 copy_to_user include/linux/uaccess.h:152 [inline] ebt_entry_to_user net/bridge/netfilter/ebtables.c:1356 [inline] copy_everything_to_user+0x31e/0x10a0 net/bridge/netfilter/ebtables.c:1454 do_ebt_get_ctl+0x1ba/0x660 net/bridge/netfilter/ebtables.c:1526 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x7a/0xd0 net/netfilter/nf_sockopt.c:122 ip_getsockopt net/ipv4/ip_sockglue.c:1576 [inline] ip_getsockopt+0x176/0x1d0 net/ipv4/ip_sockglue.c:1556 tcp_getsockopt net/ipv4/tcp.c:3678 [inline] tcp_getsockopt+0x8f/0xe0 net/ipv4/tcp.c:3672 sock_common_getsockopt+0x94/0xd0 net/core/sock.c:3101 __sys_getsockopt+0x16d/0x310 net/socket.c:2129 __do_sys_getsockopt net/socket.c:2144 [inline] __se_sys_getsockopt net/socket.c:2141 [inline] __x64_sys_getsockopt+0xbe/0x150 net/socket.c:2141 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c3fa Code: b8 34 01 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 dd 8c fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 ba 8c fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007ffc5ba0a5d8 EFLAGS: 00000202 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 000000000045c3fa RDX: 0000000000000081 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007ffc5ba0a5f0 R08: 00007ffc5ba0a5ec R09: 000000000000000a R10: 00007ffc5ba0a5f0 R11: 0000000000000202 R12: 0000000000000003 R13: 000000000070f7e0 R14: 000000000070f768 R15: 0000000000000680 Allocated by task 9724: 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 3907: 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 ffff88808af8d200 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 24 bytes inside of 1024-byte region [ffff88808af8d200, ffff88808af8d600) The buggy address belongs to the page: page:ffffea00022be300 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0xffff88808af8c480 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002840408 ffffea000231b808 ffff8880aa400c40 raw: ffff88808af8c480 ffff88808af8c000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808af8d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808af8d180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808af8d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808af8d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808af8d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================