================================================================== BUG: KASAN: slab-out-of-bounds in udf_close_lvid+0x6a8/0x9a0 fs/udf/super.c:2039 Write of size 1 at addr ffff88814ba54fc0 by task syz-executor.4/5025 CPU: 1 PID: 5025 Comm: syz-executor.4 Not tainted 6.3.0-syzkaller-13164-g78b421b6a7c6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 udf_close_lvid+0x6a8/0x9a0 fs/udf/super.c:2039 udf_put_super+0xcd/0x160 fs/udf/super.c:2326 generic_shutdown_super+0x134/0x340 fs/super.c:500 kill_block_super+0x84/0xf0 fs/super.c:1407 deactivate_locked_super+0xa4/0x110 fs/super.c:331 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1177 task_work_run+0x24a/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+0x64/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f15a068d5d7 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 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:00007ffd68f49898 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f15a068d5d7 RDX: 00007ffd68f4996b RSI: 000000000000000a RDI: 00007ffd68f49960 RBP: 00007ffd68f49960 R08: 00000000ffffffff R09: 00007ffd68f49730 R10: 0000555556261893 R11: 0000000000000246 R12: 00007f15a06e6cdc R13: 00007ffd68f4aa20 R14: 0000555556261810 R15: 00007ffd68f4aa60 Allocated by task 1: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x11f/0x2e0 mm/slub.c:3475 kmem_cache_zalloc include/linux/slab.h:670 [inline] __kernfs_new_node+0xdf/0x740 fs/kernfs/dir.c:611 kernfs_new_node+0x99/0x170 fs/kernfs/dir.c:673 __kernfs_create_file+0x49/0x2e0 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x24a/0x300 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x549/0xed0 fs/sysfs/group.c:148 sysfs_slab_add+0x163/0x2a0 mm/slub.c:6151 slab_sysfs_init+0x66/0x170 mm/slub.c:6233 do_one_initcall+0x23d/0x7d0 init/main.c:1246 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x3f/0x80 init/main.c:1335 kernel_init_freeable+0x43b/0x5d0 init/main.c:1571 kernel_init+0x1d/0x2a0 init/main.c:1462 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88814ba54e80 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 152 bytes to the right of allocated 168-byte region [ffff88814ba54e80, ffff88814ba54f28) The buggy address belongs to the physical page: page:ffffea00052e9500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14ba54 flags: 0x57ff00000000200(slab|node=1|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 057ff00000000200 ffff88801565e000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, tgid 1 (swapper/0), ts 12698307949, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 alloc_page_interleave+0x22/0x1d0 mm/mempolicy.c:2112 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3192 __slab_alloc mm/slub.c:3291 [inline] __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:3475 kmem_cache_zalloc include/linux/slab.h:670 [inline] __kernfs_new_node+0xdf/0x740 fs/kernfs/dir.c:611 kernfs_new_node+0x99/0x170 fs/kernfs/dir.c:673 __kernfs_create_file+0x49/0x2e0 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x24a/0x300 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x549/0xed0 fs/sysfs/group.c:148 sysfs_slab_add+0x163/0x2a0 mm/slub.c:6151 slab_sysfs_init+0x66/0x170 mm/slub.c:6233 do_one_initcall+0x23d/0x7d0 init/main.c:1246 page_owner free stack trace missing Memory state around the buggy address: ffff88814ba54e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88814ba54f00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff88814ba54f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88814ba55000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88814ba55080: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 ==================================================================