==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: use-after-free in atomic_dec_return include/asm-generic/atomic-instrumented.h:340 [inline]
BUG: KASAN: use-after-free in rxrpc_put_bundle+0x1d/0x80 net/rxrpc/conn_client.c:141
Write of size 4 at addr ffff8880a97ac820 by task syz-executor.1/1626
CPU: 1 PID: 1626 Comm: syz-executor.1 Not tainted 5.9.0-rc7-next-20201002-syzkaller #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+0x198/0x1fb lib/dump_stack.c:118
print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:385
__kasan_report mm/kasan/report.c:545 [inline]
kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562
check_memory_region_inline mm/kasan/generic.c:186 [inline]
check_memory_region+0x13d/0x180 mm/kasan/generic.c:192
instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
atomic_dec_return include/asm-generic/atomic-instrumented.h:340 [inline]
rxrpc_put_bundle+0x1d/0x80 net/rxrpc/conn_client.c:141
rxrpc_destroy_connection+0x150/0x2f0 net/rxrpc/conn_object.c:367
rcu_do_batch kernel/rcu/tree.c:2481 [inline]
rcu_core+0x645/0x1240 kernel/rcu/tree.c:2715
__do_softirq+0x203/0xab6 kernel/softirq.c:298
asm_call_irq_on_stack+0xf/0x20
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x9b/0xd0 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:393 [inline]
__irq_exit_rcu kernel/softirq.c:423 [inline]
irq_exit_rcu+0x235/0x280 kernel/softirq.c:435
sysvec_apic_timer_interrupt+0x51/0xf0 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631
RIP: 0010:string_nocheck lib/vsprintf.c:616 [inline]
RIP: 0010:string+0x173/0x3d0 lib/vsprintf.c:693
Code: 89 e8 48 89 ea 48 b9 00 00 00 00 00 fc ff df 48 c1 e8 03 83 e2 07 0f b6 04 08 38 d0 7f 08 84 c0 0f 85 3f 02 00 00 44 88 65 00 38 98 9d fd 8b 44 24 04 31 ff 48 83 c5 01 41 83 c7 01 42 8d 34
RSP: 0018:ffffc90007a17460 EFLAGS: 00000287
RAX: 00000000000225bc RBX: ffff88809eb3a512 RCX: ffffc9000a7cc000
RDX: 0000000000040000 RSI: ffffffff83d7ae7e RDI: 0000000000000001
RBP: ffffc90007a17665 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000065
R13: ffffc90007a17649 R14: ffff88809eb3a500 R15: 0000000000000011
vsnprintf+0x71b/0x14f0 lib/vsprintf.c:2618
tomoyo_supervisor+0x10c/0xef0 security/tomoyo/common.c:2069
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_permission+0x270/0x3a0 security/tomoyo/file.c:573
tomoyo_check_open_permission+0x30f/0x380 security/tomoyo/file.c:780
tomoyo_file_open security/tomoyo/tomoyo.c:313 [inline]
tomoyo_file_open+0xa3/0xd0 security/tomoyo/tomoyo.c:308
security_file_open+0x52/0x4f0 security/security.c:1574
do_dentry_open+0x358/0x11b0 fs/open.c:804
do_open fs/namei.c:3252 [inline]
path_openat+0x1b9a/0x2730 fs/namei.c:3369
do_filp_open+0x17e/0x3c0 fs/namei.c:3396
do_sys_openat2+0x16d/0x420 fs/open.c:1168
do_sys_open fs/open.c:1184 [inline]
__do_sys_openat fs/open.c:1200 [inline]
__se_sys_openat fs/open.c:1195 [inline]
__x64_sys_openat+0x13f/0x1f0 fs/open.c:1195
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45dea9
Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f694a25ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00000000000228c0 RCX: 000000000045dea9
RDX: 000000000000275a RSI: 00000000200001c0 RDI: ffffffffffffff9c
RBP: 000000000118bf68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c
R13: 00007fffaa84a47f R14: 00007f694a25f9c0 R15: 000000000118bf2c
Allocated by task 1619:
kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48
kasan_set_track mm/kasan/common.c:56 [inline]
__kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461
kmem_cache_alloc_trace+0x1a0/0x480 mm/slab.c:3552
kmalloc include/linux/slab.h:554 [inline]
kzalloc include/linux/slab.h:666 [inline]
rxrpc_alloc_bundle+0x88/0x2c0 net/rxrpc/conn_client.c:121
rxrpc_look_up_bundle net/rxrpc/conn_client.c:275 [inline]
rxrpc_prep_call net/rxrpc/conn_client.c:374 [inline]
rxrpc_connect_call+0x85c/0x1580 net/rxrpc/conn_client.c:710
rxrpc_new_client_call+0x961/0x1020 net/rxrpc/call_object.c:331
rxrpc_new_client_call_for_sendmsg net/rxrpc/sendmsg.c:622 [inline]
rxrpc_do_sendmsg+0xf14/0x1370 net/rxrpc/sendmsg.c:679
rxrpc_sendmsg+0x420/0x630 net/rxrpc/af_rxrpc.c:560
sock_sendmsg_nosec net/socket.c:651 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:671
____sys_sendmsg+0x331/0x810 net/socket.c:2362
___sys_sendmsg+0xf3/0x170 net/socket.c:2416
__sys_sendmmsg+0x196/0x4b0 net/socket.c:2506
__do_sys_sendmmsg net/socket.c:2535 [inline]
__se_sys_sendmmsg net/socket.c:2532 [inline]
__x64_sys_sendmmsg+0x99/0x100 net/socket.c:2532
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Freed by task 17:
kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48
kasan_set_track+0x1c/0x30 mm/kasan/common.c:56
kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355
__kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422
__cache_free mm/slab.c:3420 [inline]
kfree+0x10e/0x2a0 mm/slab.c:3758
rxrpc_put_bundle net/rxrpc/conn_client.c:146 [inline]
rxrpc_put_bundle+0x6b/0x80 net/rxrpc/conn_client.c:138
rxrpc_unbundle_conn+0x1f8/0x3d0 net/rxrpc/conn_client.c:935
rxrpc_clean_up_local_conns+0x38d/0x590 net/rxrpc/conn_client.c:1114
rxrpc_local_destroyer net/rxrpc/local_object.c:399 [inline]
rxrpc_local_processor+0x38d/0x5e0 net/rxrpc/local_object.c:433
process_one_work+0x933/0x15a0 kernel/workqueue.c:2269
worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
kthread+0x3af/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
The buggy address belongs to the object at ffff8880a97ac800
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 32 bytes inside of
192-byte region [ffff8880a97ac800, ffff8880a97ac8c0)
The buggy address belongs to the page:
page:000000003b7f5d96 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xa97ac
flags: 0xfffe0000000200(slab)
raw: 00fffe0000000200 ffffea000278ecc8 ffffea0002828c08 ffff8880aa040000
raw: 0000000000000000 ffff8880a97ac000 0000000100000010 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880a97ac700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a97ac780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff8880a97ac800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a97ac880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff8880a97ac900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================