================================================================== BUG: KASAN: use-after-free in percpu_ref_call_confirm_rcu lib/percpu-refcount.c:126 [inline] BUG: KASAN: use-after-free in percpu_ref_switch_to_atomic_rcu+0x4a3/0x540 lib/percpu-refcount.c:165 Read of size 1 at addr ffff888093cbcc30 by task syz-executor.3/10552 CPU: 0 PID: 10552 Comm: syz-executor.3 Not tainted 5.5.0-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:132 percpu_ref_call_confirm_rcu lib/percpu-refcount.c:126 [inline] percpu_ref_switch_to_atomic_rcu+0x4a3/0x540 lib/percpu-refcount.c:165 rcu_do_batch kernel/rcu/tree.c:2186 [inline] rcu_core+0x5e1/0x1390 kernel/rcu/tree.c:2410 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2419 __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:536 [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:829 RIP: 0010:tomoyo_update_domain+0x1bd/0x810 security/tomoyo/domain.c:125 Code: 00 00 48 8b 1b 48 3b 5d d0 0f 84 c8 03 00 00 e8 a9 e0 0d fe 4c 8d 6b 18 4c 89 e8 4c 89 ea 48 c1 e8 03 83 e2 07 42 0f b6 04 30 <38> d0 7f 08 84 c0 0f 85 5a 05 00 00 44 0f b6 7b 18 bf ff ff ff ff RSP: 0018:ffffc90008e6f188 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffff8880941f7680 RCX: ffffc9000f521000 RDX: 0000000000000000 RSI: ffffffff83677697 RDI: ffff8880a0176710 RBP: ffffc90008e6f200 R08: ffff88805da94080 R09: fffffbfff1402d45 R10: ffffc90008e6f178 R11: ffffffff8a016a27 R12: ffffc90008e6f248 R13: ffff8880941f7698 R14: dffffc0000000000 R15: ffff8880980a3100 tomoyo_update_path_acl security/tomoyo/file.c:398 [inline] tomoyo_write_file+0x4e7/0x750 security/tomoyo/file.c:1022 tomoyo_write_domain2+0x111/0x1d0 security/tomoyo/common.c:1152 tomoyo_add_entry security/tomoyo/common.c:2042 [inline] tomoyo_supervisor+0xbf6/0xee0 security/tomoyo/common.c:2103 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x263/0x360 security/tomoyo/file.c:573 tomoyo_check_open_permission+0x3a6/0x3e0 security/tomoyo/file.c:777 tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline] tomoyo_file_open+0xa9/0xd0 security/tomoyo/tomoyo.c:314 security_file_open+0x71/0x300 security/security.c:1529 do_dentry_open+0x37a/0x1380 fs/open.c:784 vfs_open+0xa0/0xd0 fs/open.c:914 do_last fs/namei.c:3490 [inline] path_openat+0x12ee/0x3490 fs/namei.c:3607 do_filp_open+0x192/0x260 fs/namei.c:3637 do_sys_openat2+0x5eb/0x7e0 fs/open.c:1149 do_sys_open+0xf2/0x180 fs/open.c:1165 __do_sys_openat fs/open.c:1179 [inline] __se_sys_openat fs/open.c:1174 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1174 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b399 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1535d58c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f1535d596d4 RCX: 000000000045b399 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: ffffffffffffff9c RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000007f1 R14: 00000000004c9630 R15: 000000000075bf2c Allocated by task 10512: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x163/0x770 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] kzalloc.constprop.0+0x1b/0x20 include/linux/slab.h:669 io_sqe_files_register fs/io_uring.c:5528 [inline] __io_uring_register+0xad7/0x2f40 fs/io_uring.c:6875 __do_sys_io_uring_register fs/io_uring.c:6955 [inline] __se_sys_io_uring_register fs/io_uring.c:6937 [inline] __x64_sys_io_uring_register+0x1a1/0x560 fs/io_uring.c:6937 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10510: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 io_sqe_files_unregister+0x2e2/0x4d0 fs/io_uring.c:5250 io_ring_ctx_free fs/io_uring.c:6229 [inline] io_ring_ctx_wait_and_kill+0x447/0x9b0 fs/io_uring.c:6310 io_uring_release+0x42/0x50 fs/io_uring.c:6318 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath arch/x86/entry/common.c:278 [inline] do_syscall_64+0x676/0x790 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888093cbcc00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 48 bytes inside of 256-byte region [ffff888093cbcc00, ffff888093cbcd00) The buggy address belongs to the page: page:ffffea00024f2f00 refcount:1 mapcount:0 mapping:ffff8880aa4008c0 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00024e2048 ffffea00024728c8 ffff8880aa4008c0 raw: 0000000000000000 ffff888093cbc000 0000000100000008 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888093cbcb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888093cbcb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888093cbcc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888093cbcc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888093cbcd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================