================================================================== BUG: KASAN: slab-out-of-bounds in udf_find_entry+0x9f3/0x1230 fs/udf/namei.c:253 Write of size 165 at addr ffff88802069da5a by task syz-executor207/3612 CPU: 1 PID: 3612 Comm: syz-executor207 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #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+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 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+0x9f3/0x1230 fs/udf/namei.c:253 udf_lookup fs/udf/namei.c:309 [inline] udf_lookup+0x156/0x270 fs/udf/namei.c:298 __lookup_hash+0x117/0x180 fs/namei.c:1601 do_unlinkat+0x284/0x650 fs/namei.c:4281 do_coredump+0xcf7/0x3c40 fs/coredump.c:666 get_signal+0x1be1/0x2430 kernel/signal.c:2844 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:166 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f7c7cfd90a6 Code: b8 ff ff ff ff eb b9 e8 c8 39 04 00 0f 1f 84 00 00 00 00 00 49 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 11 b8 12 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 90 48 83 ec 28 48 89 54 24 10 48 89 74 RSP: 002b:00007ffc1996ea58 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffe5 RBX: 0000000000000006 RCX: 00007f7c7cfd90a6 RDX: 0000000000000027 RSI: 0000020006000001 RDI: 0000000000000006 RBP: 00007ffc1996ea70 R08: 00007ffc1996e8f0 R09: 000055555743f380 R10: 6608000000000014 R11: 0000000000000246 R12: 0000000000000028 R13: 0000000000000006 R14: 000000000000001c R15: 00000000200004a0 Allocated by task 3612: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kmalloc include/linux/slab.h:600 [inline] udf_find_entry+0xd3f/0x1230 fs/udf/namei.c:243 udf_lookup fs/udf/namei.c:309 [inline] udf_lookup+0x156/0x270 fs/udf/namei.c:298 __lookup_hash+0x117/0x180 fs/namei.c:1601 do_unlinkat+0x284/0x650 fs/namei.c:4281 do_coredump+0xcf7/0x3c40 fs/coredump.c:666 get_signal+0x1be1/0x2430 kernel/signal.c:2844 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:166 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88802069da00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 90 bytes inside of 256-byte region [ffff88802069da00, ffff88802069db00) The buggy address belongs to the physical page: page:ffffea000081a700 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2069c head:ffffea000081a700 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000813100 dead000000000004 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 9, tgid 9 (kworker/u4:0), ts 6748281877, free_ts 0 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1829 [inline] allocate_slab+0x27e/0x3d0 mm/slub.c:1974 new_slab mm/slub.c:2034 [inline] ___slab_alloc+0x84f/0xe80 mm/slub.c:3036 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3123 slab_alloc_node mm/slub.c:3214 [inline] slab_alloc mm/slub.c:3256 [inline] kmem_cache_alloc_trace+0x323/0x3e0 mm/slub.c:3287 kmalloc include/linux/slab.h:600 [inline] scsi_probe_and_add_lun+0x3ae/0x3650 drivers/scsi/scsi_scan.c:1187 __scsi_scan_target+0x21f/0xdb0 drivers/scsi/scsi_scan.c:1665 scsi_scan_channel drivers/scsi/scsi_scan.c:1753 [inline] scsi_scan_channel+0x148/0x1e0 drivers/scsi/scsi_scan.c:1729 scsi_scan_host_selected+0x2df/0x3b0 drivers/scsi/scsi_scan.c:1782 do_scsi_scan_host+0x1e8/0x260 drivers/scsi/scsi_scan.c:1921 do_scan_async+0x3e/0x500 drivers/scsi/scsi_scan.c:1931 async_run_entry_fn+0x98/0x530 kernel/async.c:127 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 page_owner free stack trace missing Memory state around the buggy address: ffff88802069d980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802069da00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802069da80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff88802069db00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802069db80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================