================================================================== BUG: KASAN: slab-out-of-bounds in udf_find_entry+0x8a5/0x14f0 fs/udf/namei.c:253 Write of size 165 at addr ffff888012e4d25a by task syz-executor403/3763 CPU: 0 PID: 3763 Comm: syz-executor403 Not tainted 6.0.0-syzkaller-09423-g493ffd6605b2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x1f0 mm/kasan/report.c:433 kasan_report+0xc3/0xf0 mm/kasan/report.c:495 kasan_check_range+0x2a7/0x2e0 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 udf_find_entry+0x8a5/0x14f0 fs/udf/namei.c:253 udf_lookup+0xef/0x340 fs/udf/namei.c:309 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3688 do_filp_open+0x264/0x4f0 fs/namei.c:3718 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 RIP: 0033:0x7fc9eaa38979 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc9ea9c0208 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fc9eaabe4d8 RCX: 00007fc9eaa38979 RDX: 000000000000275a RSI: 0000000020000140 RDI: 00000000ffffff9c RBP: 00007fc9eaabe4d0 R08: 00007fc9eaabe4d0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc9eaabe4dc R13: 00007ffe8fd2796f R14: 00007fc9ea9c0300 R15: 0000000000022000 Allocated by task 3763: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc+0xcd/0x100 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:234 [inline] kmem_cache_alloc_trace+0x97/0x310 mm/slub.c:3289 kmalloc include/linux/slab.h:600 [inline] udf_find_entry+0x7b6/0x14f0 fs/udf/namei.c:243 udf_lookup+0xef/0x340 fs/udf/namei.c:309 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3688 do_filp_open+0x264/0x4f0 fs/namei.c:3718 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 ffff888012e4d200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 90 bytes inside of 256-byte region [ffff888012e4d200, ffff888012e4d300) The buggy address belongs to the physical page: page:ffffea00004b9300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12e4c head:ffffea00004b9300 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00004bf580 dead000000000003 ffff888012041b40 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 3323946671, free_ts 0 prep_new_page mm/page_alloc.c:2532 [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:2103 alloc_slab_page+0x70/0xf0 mm/slub.c:1829 allocate_slab+0x5e/0x520 mm/slub.c:1974 new_slab mm/slub.c:2034 [inline] ___slab_alloc+0x3ee/0xc40 mm/slub.c:3036 __slab_alloc mm/slub.c:3123 [inline] slab_alloc_node mm/slub.c:3214 [inline] slab_alloc mm/slub.c:3256 [inline] kmem_cache_alloc_trace+0x25f/0x310 mm/slub.c:3287 kmalloc include/linux/slab.h:600 [inline] kmalloc_array include/linux/slab.h:639 [inline] kcalloc include/linux/slab.h:671 [inline] audit_register_class+0x53/0x257 kernel/auditfilter.c:170 audit_classes_init+0x44/0xaa arch/x86/kernel/audit_64.c:74 do_one_initcall+0x1c9/0x400 init/main.c:1296 do_initcall_level+0x168/0x218 init/main.c:1369 do_initcalls+0x4b/0x8c init/main.c:1385 kernel_init_freeable+0x3f1/0x57b init/main.c:1623 kernel_init+0x19/0x2b0 init/main.c:1512 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page_owner free stack trace missing Memory state around the buggy address: ffff888012e4d180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888012e4d200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888012e4d280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff888012e4d300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888012e4d380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================