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+0x62d/0x7e0 fs/udf/inode.c:2090 Write of size 4 at addr ffff88802c513ff0 by task syz-executor367/5068 CPU: 0 PID: 5068 Comm: syz-executor367 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x1f0 mm/kasan/report.c:417 kasan_report+0xcd/0x100 mm/kasan/report.c:517 udf_write_aext+0x62d/0x7e0 fs/udf/inode.c:2090 udf_add_entry+0x1712/0x3300 fs/udf/namei.c:482 udf_mkdir+0x13c/0x980 fs/udf/namei.c:681 vfs_mkdir+0x3b3/0x590 fs/namei.c:4036 do_mkdirat+0x25b/0x530 fs/namei.c:4061 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4079 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+0x63/0xcd RIP: 0033:0x7fc27a8da819 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 17 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:00007ffebbb4fb28 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007fc27a8da819 RDX: 00007fc27a8da819 RSI: 0000000000000096 RDI: 0000000020000100 RBP: 00007fc27a9160cf R08: 0000000038363035 R09: 0000000038363035 R10: 000000000000189e R11: 0000000000000246 R12: 00007ffebbb4fc30 R13: 00007fc27a9160e8 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4782: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0xaf/0x190 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] tomoyo_realpath_from_path+0xcd/0x5f0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x1f3/0x480 security/tomoyo/file.c:771 security_file_open+0x50/0x560 security/security.c:1718 do_dentry_open+0x306/0x11b0 fs/open.c:869 do_open fs/namei.c:3557 [inline] path_openat+0x25ba/0x2dd0 fs/namei.c:3714 do_filp_open+0x264/0x4f0 fs/namei.c:3741 do_sys_openat2+0x124/0x4e0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1337 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+0x63/0xcd The buggy address belongs to the object at ffff88802c512000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 4080 bytes to the right of 4096-byte region [ffff88802c512000, ffff88802c513000) The buggy address belongs to the physical page: page:ffffea0000b14400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802c510000 pfn:0x2c510 head:ffffea0000b14400 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012842140 dead000000000100 dead000000000122 raw: ffff88802c510000 0000000080040003 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 10497951507, free_ts 0 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2119 alloc_slab_page+0xbd/0x190 mm/slub.c:1851 allocate_slab+0x5e/0x3c0 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0x782/0xe20 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x25b/0x340 mm/slub.c:3491 kmalloc_trace+0x26/0x60 mm/slab_common.c:1062 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] kobject_uevent_env+0x33a/0x8e0 lib/kobject_uevent.c:524 kernel_add_sysfs_param+0x106/0x130 kernel/params.c:816 param_sysfs_builtin+0x1fb/0x2b0 kernel/params.c:851 param_sysfs_builtin_init+0x29/0x30 kernel/params.c:985 do_one_initcall+0x1d1/0x410 init/main.c:1306 do_initcall_level+0x168/0x220 init/main.c:1379 do_initcalls+0x43/0x90 init/main.c:1395 kernel_init_freeable+0x428/0x5e0 init/main.c:1634 page_owner free stack trace missing Memory state around the buggy address: ffff88802c513e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802c513f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802c513f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802c514000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802c514080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================