loop0: detected capacity change from 0 to 2048 ================================================================== BUG: KASAN: slab-out-of-bounds in udf_find_entry+0x9f4/0x1230 fs/udf/namei.c:253 Write of size 105 at addr ffff8880126e0896 by task syz-executor238/3606 CPU: 1 PID: 3606 Comm: syz-executor238 Not tainted 6.1.0-rc4-syzkaller-00011-g59f2f4b8a757 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memcpy+0x39/0x60 mm/kasan/shadow.c:66 udf_find_entry+0x9f4/0x1230 fs/udf/namei.c:253 udf_lookup fs/udf/namei.c:309 [inline] udf_lookup+0x156/0x270 fs/udf/namei.c:298 lookup_open.isra.0+0x76a/0x12a0 fs/namei.c:3391 open_last_lookups fs/namei.c:3481 [inline] path_openat+0x996/0x2860 fs/namei.c:3710 do_filp_open+0x1b6/0x400 fs/namei.c:3740 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_creat fs/open.c:1402 [inline] __se_sys_creat fs/open.c:1396 [inline] __x64_sys_creat+0xc9/0x120 fs/open.c:1396 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f95326f54d9 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd7a5e5568 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f95326f54d9 RDX: 00007f95326f54d9 RSI: 0000000000000000 RDI: 0000000020000180 RBP: 00007f95326b4a10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000555555c3a2c0 R11: 0000000000000246 R12: 00007f95326b4aa0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3606: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 kasan_set_track+0x21/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa1/0xb0 mm/kasan/common.c:380 kmalloc include/linux/slab.h:576 [inline] udf_find_entry+0xd45/0x1230 fs/udf/namei.c:243 udf_lookup fs/udf/namei.c:309 [inline] udf_lookup+0x156/0x270 fs/udf/namei.c:298 lookup_open.isra.0+0x76a/0x12a0 fs/namei.c:3391 open_last_lookups fs/namei.c:3481 [inline] path_openat+0x996/0x2860 fs/namei.c:3710 do_filp_open+0x1b6/0x400 fs/namei.c:3740 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_creat fs/open.c:1402 [inline] __se_sys_creat fs/open.c:1396 [inline] __x64_sys_creat+0xc9/0x120 fs/open.c:1396 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880126e0800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 150 bytes inside of 256-byte region [ffff8880126e0800, ffff8880126e0900) The buggy address belongs to the physical page: page:ffffea000049b800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x126e0 head:ffffea000049b800 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea000049b600 dead000000000002 ffff888011841b40 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 1579917180, free_ts 0 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4288 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5555 alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2118 alloc_pages+0x22f/0x270 mm/mempolicy.c:2280 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x213/0x300 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3180 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3279 slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x191/0x3e0 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0x45/0xc0 mm/slab_common.c:975 __do_krealloc mm/slab_common.c:1350 [inline] krealloc+0x8c/0xf0 mm/slab_common.c:1383 add_sysfs_param+0xca/0x960 kernel/params.c:651 kernel_add_sysfs_param kernel/params.c:812 [inline] param_sysfs_builtin kernel/params.c:851 [inline] param_sysfs_init+0x301/0x43b kernel/params.c:970 do_one_initcall+0x13d/0x780 init/main.c:1303 do_initcall_level init/main.c:1376 [inline] do_initcalls init/main.c:1392 [inline] do_basic_setup init/main.c:1411 [inline] kernel_init_freeable+0x6ff/0x788 init/main.c:1631 kernel_init+0x1a/0x1d0 init/main.c:1519 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page_owner free stack trace missing Memory state around the buggy address: ffff8880126e0780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880126e0800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880126e0880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff8880126e0900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880126e0980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================