================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2110 Write of size 4 at addr ffff888017e4eff0 by task syz.3.1839/10735 CPU: 0 PID: 10735 Comm: syz.3.1839 Not tainted 5.15.168-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 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:2110 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:4065 do_mkdirat+0x260/0x520 fs/namei.c:4090 __do_sys_mkdirat fs/namei.c:4105 [inline] __se_sys_mkdirat fs/namei.c:4103 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4103 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7efe32757897 Code: 73 01 c3 48 c7 c1 a8 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 02 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007efe30bafe68 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007efe30bafef0 RCX: 00007efe32757897 RDX: 00000000000001ff RSI: 0000000020000040 RDI: 00000000ffffff9c RBP: 0000000020000140 R08: 00000000200000c0 R09: 0000000000000000 R10: 0000000020000140 R11: 0000000000000246 R12: 0000000020000040 R13: 00007efe30bafeb0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1: 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_krealloc include/linux/kasan.h:284 [inline] __do_krealloc mm/slab_common.c:1220 [inline] krealloc+0xab/0xf0 mm/slab_common.c:1257 add_sysfs_param+0xca/0x7f0 kernel/params.c:651 kernel_add_sysfs_param+0xb0/0x130 kernel/params.c:812 param_sysfs_builtin+0x16a/0x1f0 kernel/params.c:851 param_sysfs_init+0x66/0x70 kernel/params.c:970 do_one_initcall+0x22b/0x7a0 init/main.c:1302 do_initcall_level+0x157/0x210 init/main.c:1375 do_initcalls+0x49/0x90 init/main.c:1391 kernel_init_freeable+0x425/0x5c0 init/main.c:1615 kernel_init+0x19/0x290 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff888017e4ec00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 496 bytes to the right of 512-byte region [ffff888017e4ec00, ffff888017e4ee00) The buggy address belongs to the page: page:ffffea00005f9300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x17e4c head:ffffea00005f9300 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017041c80 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 1, ts 2200668909, free_ts 0 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:5423 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2031 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_track_caller+0x1c7/0x300 mm/slub.c:4925 __do_krealloc mm/slab_common.c:1224 [inline] krealloc+0x5c/0xf0 mm/slab_common.c:1257 add_sysfs_param+0xca/0x7f0 kernel/params.c:651 kernel_add_sysfs_param+0xb0/0x130 kernel/params.c:812 param_sysfs_builtin+0x16a/0x1f0 kernel/params.c:851 param_sysfs_init+0x66/0x70 kernel/params.c:970 do_one_initcall+0x22b/0x7a0 init/main.c:1302 do_initcall_level+0x157/0x210 init/main.c:1375 do_initcalls+0x49/0x90 init/main.c:1391 kernel_init_freeable+0x425/0x5c0 init/main.c:1615 kernel_init+0x19/0x290 init/main.c:1506 page_owner free stack trace missing Memory state around the buggy address: ffff888017e4ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888017e4ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888017e4ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888017e4f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888017e4f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================