================================================================== BUG: KASAN: use-after-free in instrument_atomic_write include/linux/instrumented.h:71 [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 ffff888091907720 by task systemd-udevd/8596 CPU: 1 PID: 8596 Comm: systemd-udevd Not tainted 5.9.0-rc8-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/0x1fd lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_write include/linux/instrumented.h:71 [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:2430 [inline] rcu_core+0x5ca/0x1130 kernel/rcu/tree.c:2658 __do_softirq+0x1f8/0xb23 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:581 RIP: 0010:tomoyo_domain_quota_is_ok+0x32a/0x550 security/tomoyo/util.c:1070 Code: 89 c6 e8 39 34 eb fd 45 85 ff 74 09 e8 cf 37 eb fd 41 83 c5 01 e8 c6 37 eb fd 8d 73 01 bf 10 00 00 00 83 c3 01 e8 d6 33 eb fd <83> fb 10 75 bd e9 bf fd ff ff 41 bc 01 00 00 00 eb 91 45 31 e4 eb RSP: 0018:ffffc900060b75b0 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000002 RCX: ffffffff838b504a RDX: 0000000000000002 RSI: ffff88805cd72480 RDI: 0000000000000001 RBP: ffff8880a79af080 R08: 0000000000000001 R09: ffffffff8d646dc7 R10: 0000000000000010 R11: 0000000000000000 R12: 0000000000000001 R13: 00000000000002f6 R14: dffffc0000000000 R15: 0000000000000000 tomoyo_supervisor+0x2f2/0xef0 security/tomoyo/common.c:2089 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+0x33e/0x380 security/tomoyo/file.c:777 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:3251 [inline] path_openat+0x1b9a/0x2730 fs/namei.c:3368 do_filp_open+0x17e/0x3c0 fs/namei.c:3395 do_sys_openat2+0x16d/0x420 fs/open.c:1168 do_sys_open fs/open.c:1184 [inline] __do_sys_open fs/open.c:1192 [inline] __se_sys_open fs/open.c:1188 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1188 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f4a8e57f6f0 Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 19 30 2c 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe 9d 01 00 48 89 04 24 RSP: 002b:00007fff06d75188 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00005624ee97e6d0 RCX: 00007f4a8e57f6f0 RDX: 00000000000001b6 RSI: 0000000000080000 RDI: 00007fff06d75330 RBP: 0000000000000008 R08: 0000000000000008 R09: 0000000000000001 R10: 0000000000080000 R11: 0000000000000246 R12: 00005624ecab968a R13: 0000000000000001 R14: 00005624ee98ce00 R15: 00007fff06d753b0 Allocated by task 8753: 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+0x174/0x300 mm/slab.c:3554 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/0x136d 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:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmmsg+0x195/0x480 net/socket.c:2497 __do_sys_sendmmsg net/socket.c:2526 [inline] __se_sys_sendmmsg net/socket.c:2523 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2523 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 7841: 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:3422 [inline] kfree+0x10e/0x2b0 mm/slab.c:3760 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/0x587 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+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff888091907700 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 32 bytes inside of 192-byte region [ffff888091907700, ffff8880919077c0) The buggy address belongs to the page: page:000000007fe3d189 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888091907d00 pfn:0x91907 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002841788 ffffea0002403b08 ffff8880aa040000 raw: ffff888091907d00 ffff888091907000 000000010000000d 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888091907600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888091907680: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888091907700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888091907780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888091907800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================