hfsplus: invalid length 256 has been corrected to 255 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x5b9/0x1240 fs/hfsplus/unicode.c:210 Read of size 2 at addr ffff8880272b6a18 by task syz.0.57/4594 CPU: 1 PID: 4594 Comm: syz.0.57 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 hfsplus_uni2asc+0x5b9/0x1240 fs/hfsplus/unicode.c:210 hfsplus_listxattr+0x58b/0xb80 fs/hfsplus/xattr.c:740 vfs_listxattr fs/xattr.c:457 [inline] listxattr+0x283/0x2e0 fs/xattr.c:804 path_listxattr+0xd9/0x1b0 fs/xattr.c:828 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fc40618f6c9 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc407045038 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 00007fc4063e5fa0 RCX: 00007fc40618f6c9 RDX: 0000000000000037 RSI: 00002000000001c0 RDI: 0000200000000180 RBP: 00007fc406211f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc4063e6038 R14: 00007fc4063e5fa0 R15: 00007fff29aaecf8 Allocated by task 4594: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xb0/0x240 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:699 [inline] hfsplus_find_init+0x85/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_listxattr+0x38c/0xb80 fs/hfsplus/xattr.c:700 vfs_listxattr fs/xattr.c:457 [inline] listxattr+0x283/0x2e0 fs/xattr.c:804 path_listxattr+0xd9/0x1b0 fs/xattr.c:828 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff8880272b6800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 536 bytes inside of 1024-byte region [ffff8880272b6800, ffff8880272b6c00) The buggy address belongs to the physical page: page:ffffea00009cac00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x272b0 head:ffffea00009cac00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888017441dc0 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 9, tgid 9 (kworker/u4:0), ts 7139546749, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_slab_page+0x4f/0x160 mm/slub.c:1801 allocate_slab mm/slub.c:1944 [inline] new_slab+0x87/0x2c0 mm/slub.c:1997 ___slab_alloc+0xbc6/0x1230 mm/slub.c:3154 __slab_alloc mm/slub.c:3240 [inline] slab_alloc_node mm/slub.c:3325 [inline] __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398 kmalloc_node_trace+0x22/0xe0 mm/slab_common.c:1039 kmalloc_node include/linux/slab.h:585 [inline] kzalloc_node include/linux/slab.h:710 [inline] blk_mq_alloc_hctx block/blk-mq.c:3711 [inline] blk_mq_alloc_and_init_hctx+0x18d/0xd70 block/blk-mq.c:4189 blk_mq_realloc_hw_ctxs+0x17c/0x420 block/blk-mq.c:4222 blk_mq_init_allocated_queue+0x535/0x1780 block/blk-mq.c:4284 blk_mq_init_queue_data block/blk-mq.c:4093 [inline] blk_mq_init_queue+0xa5/0x120 block/blk-mq.c:4103 scsi_alloc_sdev+0x70e/0xae0 drivers/scsi/scsi_scan.c:335 scsi_probe_and_add_lun+0x1a9/0x4430 drivers/scsi/scsi_scan.c:1186 __scsi_scan_target+0x1d8/0x1010 drivers/scsi/scsi_scan.c:1718 scsi_scan_channel drivers/scsi/scsi_scan.c:1806 [inline] scsi_scan_host_selected+0x36e/0x690 drivers/scsi/scsi_scan.c:1835 page_owner free stack trace missing Memory state around the buggy address: ffff8880272b6900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880272b6980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880272b6a00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880272b6a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880272b6b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================