loop0: detected capacity change from 0 to 2048 UDF-fs: error (device loop0): udf_read_tagged: tag checksum failed, block 99: 0x27 != 0x4d ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x6a7/0x7a0 fs/udf/inode.c:2089 Write of size 4 at addr ffff88802160abf8 by task syz-executor102/3802 CPU: 0 PID: 3802 Comm: syz-executor102 Not tainted 6.1.29-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 udf_write_aext+0x6a7/0x7a0 fs/udf/inode.c:2089 udf_add_entry+0x17b7/0x3350 fs/udf/namei.c:482 udf_mkdir+0x1a8/0xaa0 fs/udf/namei.c:681 vfs_mkdir+0x3b6/0x590 fs/namei.c:4036 do_mkdirat+0x260/0x520 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:0x7fd779aec4b7 Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 53 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd779a98028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007fd779a986b8 RCX: 00007fd779aec4b7 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000000020000040 RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000020000040 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3619: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xb2/0x230 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] udf_alloc_i_data fs/udf/inode.c:1598 [inline] udf_read_inode fs/udf/inode.c:1413 [inline] __udf_iget+0xcf1/0x39b0 fs/udf/inode.c:1902 udf_iget_special fs/udf/udfdecl.h:146 [inline] udf_fill_partdesc_info+0x7b7/0x1200 fs/udf/super.c:1120 udf_load_partdesc fs/udf/super.c:1268 [inline] udf_process_sequence+0x1516/0x4f20 fs/udf/super.c:1776 udf_load_sequence fs/udf/super.c:1814 [inline] udf_check_anchor_block+0x3d9/0x6f0 fs/udf/super.c:1853 udf_scan_anchors+0x15b/0x660 fs/udf/super.c:1886 udf_find_anchor fs/udf/super.c:1942 [inline] udf_load_vrs+0x229/0xc40 fs/udf/super.c:2007 udf_fill_super+0x966/0x2390 fs/udf/super.c:2185 mount_bdev+0x26d/0x3a0 fs/super.c:1423 legacy_get_tree+0xeb/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1553 do_new_mount+0x28b/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3568 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 Freed by task 3539: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674 udf_evict_inode+0x256/0x3d0 fs/udf/inode.c:160 evict+0x2a4/0x620 fs/inode.c:664 udf_free_partition fs/udf/super.c:280 [inline] udf_sb_free_partitions+0x127/0x540 fs/udf/super.c:307 udf_put_super+0x10f/0x160 fs/udf/super.c:2362 generic_shutdown_super+0x130/0x340 fs/super.c:501 kill_block_super+0x7a/0xe0 fs/super.c:1450 deactivate_locked_super+0xa0/0x110 fs/super.c:332 cleanup_mnt+0x490/0x520 fs/namespace.c:1186 task_work_run+0x246/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88802160a800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 504 bytes to the right of 512-byte region [ffff88802160a800, ffff88802160aa00) The buggy address belongs to the physical page: page:ffffea0000858200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21608 head:ffffea0000858200 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea000066d700 dead000000000003 ffff888012441c80 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1047, tgid 1047 (kworker/u4:3), ts 6611532027, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533 prep_new_page mm/page_alloc.c:2540 [inline] get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xa71/0x1080 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] alloc_bprm+0x57/0x700 fs/exec.c:1508 kernel_execve+0x92/0xa10 fs/exec.c:1967 call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:113 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page_owner free stack trace missing Memory state around the buggy address: ffff88802160aa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802160ab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802160ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802160ac00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802160ac80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================