================================================================== BUG: KASAN: use-after-free in io_uring_show_cred+0x5bb/0x5f0 fs/io_uring.c:8921 Read of size 8 at addr ffff888026786620 by task syz-executor.5/12285 CPU: 1 PID: 12285 Comm: syz-executor.5 Not tainted 5.10.0-rc2-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+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 io_uring_show_cred+0x5bb/0x5f0 fs/io_uring.c:8921 idr_for_each+0x113/0x220 lib/idr.c:208 __io_uring_show_fdinfo fs/io_uring.c:8974 [inline] io_uring_show_fdinfo+0x923/0xda0 fs/io_uring.c:8996 seq_show+0x4a8/0x700 fs/proc/fd.c:65 seq_read+0x432/0x1070 fs/seq_file.c:208 do_loop_readv_writev fs/read_write.c:761 [inline] do_loop_readv_writev fs/read_write.c:748 [inline] do_iter_read+0x48e/0x6e0 fs/read_write.c:803 vfs_readv+0xe5/0x150 fs/read_write.c:921 do_preadv fs/read_write.c:1013 [inline] __do_sys_preadv fs/read_write.c:1063 [inline] __se_sys_preadv fs/read_write.c:1058 [inline] __x64_sys_preadv+0x231/0x310 fs/read_write.c:1058 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 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:00007efeb4e09c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 0000000000025e40 RCX: 000000000045deb9 RDX: 0000000000000001 RSI: 0000000020001400 RDI: 0000000000000004 RBP: 000000000118bf70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 000000000169fb7f R14: 00007efeb4e0a9c0 R15: 000000000118bf2c Allocated by task 10473: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:664 [inline] tomoyo_get_condition+0x6a0/0x1b50 security/tomoyo/condition.c:669 tomoyo_update_domain+0x458/0x850 security/tomoyo/domain.c:108 tomoyo_update_path_acl security/tomoyo/file.c:398 [inline] tomoyo_write_file+0x4f6/0x7f0 security/tomoyo/file.c:1022 tomoyo_write_domain2+0x116/0x1d0 security/tomoyo/common.c:1152 tomoyo_add_entry security/tomoyo/common.c:2042 [inline] tomoyo_supervisor+0xbc4/0xef0 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+0x270/0x3a0 security/tomoyo/file.c:573 tomoyo_path_perm+0x39e/0x400 security/tomoyo/file.c:838 tomoyo_path_symlink+0x94/0xe0 security/tomoyo/tomoyo.c:200 security_path_symlink+0xdf/0x150 security/security.c:1110 do_symlinkat+0x123/0x2c0 fs/namei.c:3985 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888026786600 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 32 bytes inside of 96-byte region [ffff888026786600, ffff888026786660) The buggy address belongs to the page: page:000000005b193bb6 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26786 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea000094edc0 0000001000000002 ffff888010041780 raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888026786500: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888026786580: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc >ffff888026786600: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff888026786680: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff888026786700: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ==================================================================