UDF-fs: Scanning with blocksize 512 failed UDF-fs: warning (device loop0): udf_load_vrs: No VRS found UDF-fs: Scanning with blocksize 1024 failed UDF-fs: warning (device loop0): udf_load_vrs: No VRS found UDF-fs: Scanning with blocksize 2048 failed UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2100 Write of size 4 at addr ffff88807986bff0 by task syz-executor123/3499 CPU: 1 PID: 3499 Comm: syz-executor123 Not tainted 5.15.118-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2100 udf_add_entry+0x17b7/0x3350 fs/udf/namei.c:482 udf_mkdir+0x1a8/0xaa0 fs/udf/namei.c:681 vfs_mkdir+0x419/0x640 fs/namei.c:3994 do_mkdirat+0x260/0x520 fs/namei.c:4019 __do_sys_mkdirat fs/namei.c:4034 [inline] __se_sys_mkdirat fs/namei.c:4032 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4032 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f20005ccae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc1d2a8648 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f20005ccae9 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 00000000ffffff9c RBP: 00007f200058c0f0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000018a0 R11: 0000000000000246 R12: 00007f200058c180 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3499: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247 kmalloc include/linux/slab.h:591 [inline] tomoyo_print_header security/tomoyo/audit.c:156 [inline] tomoyo_init_log+0x1bf/0x1fe0 security/tomoyo/audit.c:255 tomoyo_supervisor+0x3b8/0x12c0 security/tomoyo/common.c:2097 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x5ba/0x810 security/tomoyo/file.c:734 tomoyo_path_mkdir+0xe3/0x120 security/tomoyo/tomoyo.c:166 security_path_mkdir+0xdc/0x130 security/security.c:1155 do_mkdirat+0x19f/0x520 fs/namei.c:4014 __do_sys_mkdirat fs/namei.c:4034 [inline] __se_sys_mkdirat fs/namei.c:4032 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4032 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 3499: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0xf1/0x270 mm/slub.c:4559 tomoyo_init_log+0x1ca0/0x1fe0 security/tomoyo/audit.c:294 tomoyo_supervisor+0x3b8/0x12c0 security/tomoyo/common.c:2097 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x5ba/0x810 security/tomoyo/file.c:734 tomoyo_path_mkdir+0xe3/0x120 security/tomoyo/tomoyo.c:166 security_path_mkdir+0xdc/0x130 security/security.c:1155 do_mkdirat+0x19f/0x520 fs/namei.c:4014 __do_sys_mkdirat fs/namei.c:4034 [inline] __se_sys_mkdirat fs/namei.c:4032 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4032 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88807986a000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 4080 bytes to the right of 4096-byte region [ffff88807986a000, ffff88807986b000) The buggy address belongs to the page: page:ffffea0001e61a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79868 head:ffffea0001e61a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888011c42140 raw: 0000000000000000 0000000080040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3499, ts 54067281352, free_ts 53948223741 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1c9/0x300 mm/slub.c:4403 kmalloc include/linux/slab.h:596 [inline] tomoyo_realpath_from_path+0xd8/0x5e0 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x225/0x810 security/tomoyo/file.c:723 tomoyo_path_mkdir+0xe3/0x120 security/tomoyo/tomoyo.c:166 security_path_mkdir+0xdc/0x130 security/security.c:1155 do_mkdirat+0x19f/0x520 fs/namei.c:4014 __do_sys_mkdirat fs/namei.c:4034 [inline] __se_sys_mkdirat fs/namei.c:4032 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4032 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1b7/0x210 mm/slub.c:2507 put_cpu_partial+0x132/0x1a0 mm/slub.c:2587 do_slab_free mm/slub.c:3487 [inline] ___cache_free+0xe3/0x100 mm/slub.c:3506 qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x120/0x300 mm/slub.c:4403 kmalloc include/linux/slab.h:596 [inline] tomoyo_add_entry security/tomoyo/common.c:2031 [inline] tomoyo_supervisor+0xe67/0x12c0 security/tomoyo/common.c:2103 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x174/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0x137e/0x1cf0 security/tomoyo/domain.c:879 tomoyo_bprm_check_security+0xdb/0x120 security/tomoyo/tomoyo.c:101 security_bprm_check+0x5f/0xa0 security/security.c:868 search_binary_handler fs/exec.c:1722 [inline] exec_binprm fs/exec.c:1775 [inline] bprm_execve+0x84e/0x17c0 fs/exec.c:1844 Memory state around the buggy address: ffff88807986be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807986bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807986bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807986c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807986c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================