UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x6e3/0x7d0 fs/udf/inode.c:2076 Write of size 4 at addr ffff8880aaad19f0 by task syz-executor.4/10842 CPU: 0 PID: 10842 Comm: syz-executor.4 Not tainted 4.14.301-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_store_n_noabort+0x6b/0x80 mm/kasan/report.c:446 udf_write_aext+0x6e3/0x7d0 fs/udf/inode.c:2076 udf_add_entry+0xc54/0x2710 fs/udf/namei.c:501 udf_mkdir+0x122/0x620 fs/udf/namei.c:699 vfs_mkdir+0x463/0x6e0 fs/namei.c:3851 SYSC_mkdirat fs/namei.c:3874 [inline] SyS_mkdirat+0x1fd/0x270 fs/namei.c:3858 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7ff18edd00d9 RSP: 002b:00007ff18d342168 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007ff18eeeff80 RCX: 00007ff18edd00d9 RDX: 0000000000000000 RSI: 0000000020000540 RDI: 0000000000000004 RBP: 00007ff18ee2bae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdd4bdfd9f R14: 00007ff18d342300 R15: 0000000000022000 Allocated by task 4629: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] kernfs_fop_open+0x266/0xc40 fs/kernfs/file.c:648 do_dentry_open+0x44b/0xec0 fs/open.c:777 vfs_open+0x105/0x220 fs/open.c:888 do_last fs/namei.c:3428 [inline] path_openat+0x628/0x2970 fs/namei.c:3571 do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 4629: F2FS-fs (loop1): Mismatch start address, segment0(512) cp_blkaddr(605) save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 kernfs_fop_release+0x10e/0x180 fs/kernfs/file.c:783 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 The buggy address belongs to the object at ffff8880aaad1780 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 112 bytes to the right of 512-byte region [ffff8880aaad1780, ffff8880aaad1980) The buggy address belongs to the page: page:ffffea0002aab440 count:1 mapcount:0 mapping:ffff8880aaad1000 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880aaad1000 0000000000000000 0000000100000006 raw: ffffea0002a84ea0 ffffea0002ab45a0 ffff88813fe74940 0000000000000000 F2FS-fs (loop1): Can't find valid F2FS filesystem in 1th superblock page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aaad1880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880aaad1900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb F2FS-fs (loop1): Found nat_bits in checkpoint >ffff8880aaad1980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880aaad1a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880aaad1a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================