loop4: detected capacity change from 0 to 64 ================================================================== BUG: KASAN: slab-out-of-bounds in hfs_asc2mac+0x693/0x720 fs/hfs/trans.c:133 Write of size 1 at addr ffff88807cfc2a4e by task syz-executor.4/11129 CPU: 0 PID: 11129 Comm: syz-executor.4 Not tainted 6.1.0-rc8-syzkaller-00018-g479174d402bc #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+0xd1/0x138 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+0xbf/0x1f0 mm/kasan/report.c:495 hfs_asc2mac+0x693/0x720 fs/hfs/trans.c:133 hfs_cat_build_key+0xc4/0x170 fs/hfs/catalog.c:28 hfs_lookup+0x1c6/0x310 fs/hfs/dir.c:31 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:3711 do_filp_open+0x1ba/0x410 fs/namei.c:3741 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+0xcd/0x120 fs/open.c:1396 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fbc03c8c0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbc04a1a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fbc03dabf80 RCX: 00007fbc03c8c0d9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000c00 RBP: 00007fbc03ce7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffccce919af R14: 00007fbc04a1a300 R15: 0000000000022000 Allocated by task 11129: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] hfs_find_init+0x95/0x240 fs/hfs/bfind.c:21 hfs_lookup+0x102/0x310 fs/hfs/dir.c:28 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:3711 do_filp_open+0x1ba/0x410 fs/namei.c:3741 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+0xcd/0x120 fs/open.c:1396 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:481 kvfree_call_rcu+0x78/0x8f0 kernel/rcu/tree.c:3343 cfg80211_update_known_bss+0x827/0xa70 net/wireless/scan.c:1683 cfg80211_bss_update+0xf3/0x21d0 net/wireless/scan.c:1730 cfg80211_inform_single_bss_frame_data+0x761/0xfc0 net/wireless/scan.c:2499 cfg80211_inform_bss_frame_data+0xc3/0xc80 net/wireless/scan.c:2532 ieee80211_bss_info_update+0x35c/0xaf0 net/mac80211/scan.c:190 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline] ieee80211_ibss_rx_queued_mgmt+0x1a32/0x3190 net/mac80211/ibss.c:1638 ieee80211_iface_process_skb net/mac80211/iface.c:1630 [inline] ieee80211_iface_work+0xa4b/0xd30 net/mac80211/iface.c:1684 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:481 kvfree_call_rcu+0x78/0x8f0 kernel/rcu/tree.c:3343 cfg80211_update_known_bss+0x827/0xa70 net/wireless/scan.c:1683 cfg80211_bss_update+0xf3/0x21d0 net/wireless/scan.c:1730 cfg80211_inform_single_bss_frame_data+0x761/0xfc0 net/wireless/scan.c:2499 cfg80211_inform_bss_frame_data+0xc3/0xc80 net/wireless/scan.c:2532 ieee80211_bss_info_update+0x35c/0xaf0 net/mac80211/scan.c:190 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline] ieee80211_ibss_rx_queued_mgmt+0x1a32/0x3190 net/mac80211/ibss.c:1638 ieee80211_iface_process_skb net/mac80211/iface.c:1630 [inline] ieee80211_iface_work+0xa4b/0xd30 net/mac80211/iface.c:1684 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff88807cfc2a00 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 78 bytes inside of 96-byte region [ffff88807cfc2a00, ffff88807cfc2a60) The buggy address belongs to the physical page: page:ffffea0001f3f080 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807cfc2900 pfn:0x7cfc2 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000001 ffff888012041780 raw: ffff88807cfc2900 000000008020000f 00000001ffffffff 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 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 22, tgid 22 (kworker/1:0), ts 268565406238, free_ts 268240105044 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4291 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5558 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x25f/0x350 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+0x199/0x3e0 mm/slub.c:3437 kmalloc_trace+0x26/0x60 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] dst_cow_metrics_generic+0x4c/0x1f0 net/core/dst.c:199 dst_metrics_write_ptr include/net/dst.h:119 [inline] dst_metric_set include/net/dst.h:180 [inline] icmp6_dst_alloc+0x4c4/0x680 net/ipv6/route.c:3274 ndisc_send_skb+0x10ef/0x1740 net/ipv6/ndisc.c:488 ndisc_send_ns+0xaa/0x130 net/ipv6/ndisc.c:666 addrconf_dad_work+0xbf4/0x12d0 net/ipv6/addrconf.c:4171 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x4d0 mm/page_alloc.c:3483 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x184/0x210 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x66/0x90 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] __kmem_cache_alloc_node+0x2e2/0x3e0 mm/slub.c:3437 kmalloc_trace+0x26/0x60 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] nsim_fib4_rt_create drivers/net/netdevsim/fib.c:280 [inline] nsim_fib4_rt_insert drivers/net/netdevsim/fib.c:426 [inline] nsim_fib4_event drivers/net/netdevsim/fib.c:464 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:884 [inline] nsim_fib_event_work+0x728/0x24a0 drivers/net/netdevsim/fib.c:1492 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff88807cfc2900: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88807cfc2980: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff88807cfc2a00: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff88807cfc2a80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88807cfc2b00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================