================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0xc1/0x1e0 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff88801e350ee0 by task syz.0.0/5325 CPU: 0 UID: 0 PID: 5325 Comm: syz.0.0 Not tainted 6.14.0-rc7-syzkaller-00069-g81e4f8d68c66 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 hfsplus_bnode_read+0xc1/0x1e0 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] hfsplus_bnode_dump+0x289/0x6a0 fs/hfsplus/bnode.c:321 hfsplus_brec_remove+0x42c/0x4f0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x275/0x450 fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x25b/0x2f0 fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x4ad/0x2380 fs/hfsplus/xattr.c:342 hfsplus_setxattr+0x11c/0x180 fs/hfsplus/xattr.c:432 hfsplus_user_setxattr+0x40/0x60 fs/hfsplus/xattr_user.c:30 __vfs_setxattr+0x468/0x4a0 fs/xattr.c:200 __vfs_setxattr_noperm+0x12e/0x660 fs/xattr.c:234 vfs_setxattr+0x221/0x430 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x2af/0x430 fs/xattr.c:665 path_setxattrat+0x440/0x510 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff6d478d169 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:00007ff6d55f8038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007ff6d49a5fa0 RCX: 00007ff6d478d169 RDX: 0000000000000000 RSI: 0000400000000380 RDI: 0000400000000340 RBP: 00007ff6d480e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff6d49a5fa0 R15: 00007ffc27a27138 Allocated by task 5325: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4294 [inline] __kmalloc_noprof+0x285/0x4c0 mm/slub.c:4306 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] __hfs_bnode_create+0xf8/0x770 fs/hfsplus/bnode.c:409 hfsplus_bnode_find+0x22b/0xe40 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x183/0x570 fs/hfsplus/bfind.c:172 hfsplus_attr_exists+0x15f/0x1d0 fs/hfsplus/attributes.c:182 __hfsplus_setxattr+0x476/0x2380 fs/hfsplus/xattr.c:336 hfsplus_setxattr+0x11c/0x180 fs/hfsplus/xattr.c:432 hfsplus_user_setxattr+0x40/0x60 fs/hfsplus/xattr_user.c:30 __vfs_setxattr+0x468/0x4a0 fs/xattr.c:200 __vfs_setxattr_noperm+0x12e/0x660 fs/xattr.c:234 vfs_setxattr+0x221/0x430 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x2af/0x430 fs/xattr.c:665 path_setxattrat+0x440/0x510 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88801e350e00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 72 bytes to the right of allocated 152-byte region [ffff88801e350e00, ffff88801e350e98) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88801e350400 pfn:0x1e350 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801b0413c0 ffffea000078bc90 ffff88801b040288 raw: ffff88801e350400 000000000010000e 00000000f5000000 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 1, tgid 1 (swapper/0), ts 10084021142, free_ts 8547499941 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_pages_slowpath+0x434/0x10b0 mm/page_alloc.c:4289 __alloc_frozen_pages_noprof+0x49b/0x710 mm/page_alloc.c:4753 alloc_slab_page mm/slub.c:2425 [inline] allocate_slab+0x66/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __do_kmalloc_node mm/slub.c:4293 [inline] __kmalloc_node_noprof+0x2ee/0x4d0 mm/slub.c:4300 __kvmalloc_node_noprof+0x72/0x190 mm/util.c:665 sbitmap_init_node+0x2d4/0x670 lib/sbitmap.c:132 blk_mq_alloc_hctx block/blk-mq.c:3976 [inline] blk_mq_alloc_and_init_hctx+0x4e8/0xd50 block/blk-mq.c:4448 blk_mq_realloc_hw_ctxs+0x19c/0xb00 block/blk-mq.c:4481 blk_mq_init_allocated_queue+0x3f6/0x14c0 block/blk-mq.c:4535 blk_mq_alloc_queue block/blk-mq.c:4348 [inline] __blk_mq_alloc_disk+0x1ae/0x370 block/blk-mq.c:4391 nbd_dev_add+0x50f/0xc60 drivers/block/nbd.c:1933 nbd_init+0x210/0x2c0 drivers/block/nbd.c:2670 page last free pid 9 tgid 9 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2660 discard_slab mm/slub.c:2684 [inline] __put_partials+0x160/0x1c0 mm/slub.c:3153 put_cpu_partial+0x17c/0x250 mm/slub.c:3228 __slab_free+0x290/0x380 mm/slub.c:4479 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] __kmalloc_cache_noprof+0x1d9/0x390 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] drm_atomic_state_alloc+0xa6/0x100 drivers/gpu/drm/drm_atomic.c:173 drm_atomic_helper_dirtyfb+0xee/0xe60 drivers/gpu/drm/drm_damage_helper.c:126 drm_fbdev_shmem_helper_fb_dirty+0x151/0x2c0 drivers/gpu/drm/drm_fbdev_shmem.c:117 drm_fb_helper_fb_dirty drivers/gpu/drm/drm_fb_helper.c:376 [inline] drm_fb_helper_damage_work+0x275/0x880 drivers/gpu/drm/drm_fb_helper.c:399 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd30 kernel/workqueue.c:3400 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 Memory state around the buggy address: ffff88801e350d80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801e350e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801e350e80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801e350f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801e350f80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================