================================================================== BUG: KASAN: slab-use-after-free in hfsplus_bnode_read+0x234/0x250 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff88801da34c00 by task syz-executor.3/6993 CPU: 3 PID: 6993 Comm: syz-executor.3 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 hfsplus_bnode_read+0x234/0x250 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] hfsplus_bnode_dump+0x2a2/0x3e0 fs/hfsplus/bnode.c:321 hfsplus_brec_remove+0x3e2/0x4f0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x2a2/0x3b0 fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x27e/0x310 fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x66e/0x2290 fs/hfsplus/xattr.c:342 hfsplus_setxattr+0x98/0xe0 fs/hfsplus/xattr.c:432 __vfs_setxattr+0x173/0x1e0 fs/xattr.c:200 __vfs_setxattr_noperm+0x127/0x660 fs/xattr.c:234 __vfs_setxattr_locked+0x182/0x260 fs/xattr.c:295 vfs_setxattr+0x146/0x350 fs/xattr.c:321 do_setxattr+0x146/0x170 fs/xattr.c:629 setxattr+0x15d/0x180 fs/xattr.c:652 path_setxattr+0x179/0x1e0 fs/xattr.c:671 __do_sys_setxattr fs/xattr.c:687 [inline] __se_sys_setxattr fs/xattr.c:683 [inline] __ia32_sys_setxattr+0xc0/0x160 fs/xattr.c:683 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7328579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5ef95ac EFLAGS: 00000292 ORIG_RAX: 00000000000000e2 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00000000200001c0 RDX: 0000000020001400 RSI: 0000000000000835 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 5282: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kmalloc_noprof include/linux/slab.h:660 [inline] addr_event.part.0+0x7b/0x4f0 drivers/infiniband/core/roce_gid_mgmt.c:839 addr_event drivers/infiniband/core/roce_gid_mgmt.c:823 [inline] inet6addr_event+0x165/0x1e0 drivers/infiniband/core/roce_gid_mgmt.c:882 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 atomic_notifier_call_chain+0x71/0x1c0 kernel/notifier.c:231 ipv6_add_addr+0x13f5/0x2090 net/ipv6/addrconf.c:1180 addrconf_add_linklocal+0x2a6/0x650 net/ipv6/addrconf.c:3314 addrconf_addr_gen+0x37b/0x3d0 net/ipv6/addrconf.c:3445 addrconf_dev_config net/ipv6/addrconf.c:3491 [inline] addrconf_init_auto_addrs+0x446/0x820 net/ipv6/addrconf.c:3569 addrconf_notify+0x6ef/0x19e0 net/ipv6/addrconf.c:3742 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1992 netdev_state_change net/core/dev.c:1374 [inline] netdev_state_change+0x115/0x150 net/core/dev.c:1367 linkwatch_do_dev+0x12b/0x160 net/core/link_watch.c:177 __linkwatch_run_queue+0x233/0x690 net/core/link_watch.c:234 linkwatch_event+0x8f/0xc0 net/core/link_watch.c:277 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 45: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2196 [inline] slab_free mm/slub.c:4437 [inline] kfree+0x12a/0x3b0 mm/slub.c:4558 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541 insert_work+0x36/0x230 kernel/workqueue.c:2207 __queue_work+0x944/0x1020 kernel/workqueue.c:2359 queue_work_on+0x11a/0x140 kernel/workqueue.c:2410 queue_work include/linux/workqueue.h:621 [inline] addr_event.part.0+0x341/0x4f0 drivers/infiniband/core/roce_gid_mgmt.c:852 addr_event drivers/infiniband/core/roce_gid_mgmt.c:823 [inline] inet6addr_event+0x165/0x1e0 drivers/infiniband/core/roce_gid_mgmt.c:882 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 atomic_notifier_call_chain+0x71/0x1c0 kernel/notifier.c:231 ipv6_add_addr+0x13f5/0x2090 net/ipv6/addrconf.c:1180 addrconf_add_linklocal+0x2a6/0x650 net/ipv6/addrconf.c:3314 addrconf_addr_gen+0x37b/0x3d0 net/ipv6/addrconf.c:3445 addrconf_dev_config net/ipv6/addrconf.c:3491 [inline] addrconf_init_auto_addrs+0x446/0x820 net/ipv6/addrconf.c:3569 addrconf_notify+0x6ef/0x19e0 net/ipv6/addrconf.c:3742 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1992 netdev_state_change net/core/dev.c:1374 [inline] netdev_state_change+0x115/0x150 net/core/dev.c:1367 linkwatch_do_dev+0x12b/0x160 net/core/link_watch.c:177 __linkwatch_run_queue+0x233/0x690 net/core/link_watch.c:234 linkwatch_event+0x8f/0xc0 net/core/link_watch.c:277 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88801da34c00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes inside of freed 192-byte region [ffff88801da34c00, ffff88801da34cc0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1da34 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000000 ffff8880154423c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080100010 00000001ffffefff 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 12744266998, free_ts 12563157927 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x136a/0x2e50 mm/page_alloc.c:3420 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4678 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x56/0x110 mm/slub.c:2265 allocate_slab mm/slub.c:2428 [inline] new_slab+0x84/0x260 mm/slub.c:2481 ___slab_alloc+0xdac/0x1870 mm/slub.c:3667 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757 __slab_alloc_node mm/slub.c:3810 [inline] slab_alloc_node mm/slub.c:3989 [inline] __do_kmalloc_node mm/slub.c:4121 [inline] __kmalloc_noprof+0x37f/0x420 mm/slub.c:4135 kmalloc_noprof include/linux/slab.h:664 [inline] usb_alloc_urb+0x71/0x1a0 drivers/usb/core/urb.c:75 hub_configure drivers/usb/core/hub.c:1695 [inline] hub_probe+0x1b23/0x3210 drivers/usb/core/hub.c:1965 usb_probe_interface+0x309/0x9d0 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:578 [inline] really_probe+0x23e/0xa90 drivers/base/dd.c:656 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:798 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:828 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:956 bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2583 __put_partials+0x14c/0x170 mm/slub.c:2995 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3941 [inline] slab_alloc_node mm/slub.c:4001 [inline] kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4008 __kernfs_new_node+0xd3/0x890 fs/kernfs/dir.c:624 kernfs_new_node+0x186/0x240 fs/kernfs/dir.c:700 __kernfs_create_file+0x53/0x350 fs/kernfs/file.c:1034 sysfs_add_file_mode_ns+0x1ff/0x3b0 fs/sysfs/file.c:307 sysfs_merge_group+0x1b1/0x340 fs/sysfs/group.c:373 dpm_sysfs_add+0x237/0x280 drivers/base/power/sysfs.c:707 device_add+0x9a8/0x1a70 drivers/base/core.c:3681 usb_create_ep_devs+0x160/0x2b0 drivers/usb/core/endpoint.c:169 usb_new_device+0xfe5/0x1960 drivers/usb/core/hub.c:2681 register_root_hub+0x299/0x730 drivers/usb/core/hcd.c:994 Memory state around the buggy address: ffff88801da34b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801da34b80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801da34c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801da34c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88801da34d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi