================================================================== BUG: KASAN: slab-out-of-bounds in hfs_asc2mac+0x693/0x720 fs/hfs/trans.c:133 Write of size 1 at addr ffff8880282f33ce by task syz-executor.1/18120 CPU: 0 PID: 18120 Comm: syz-executor.1 Not tainted 6.1.0-rc7-syzkaller-00200-gc2bf05db6c78 #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/0x461 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_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x143/0x1f0 fs/open.c:1337 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:0x7fa45ca8c0d9 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:00007fa45bdde168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fa45cbac120 RCX: 00007fa45ca8c0d9 RDX: 0000000000000102 RSI: 0000000020000740 RDI: ffffffffffffff9c RBP: 00007fa45cae7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd4da58fcf R14: 00007fa45bdde300 R15: 0000000000022000 Allocated by task 18120: 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+0xa3/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_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x143/0x1f0 fs/open.c:1337 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+0x7b/0x90 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+0x7b/0x90 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 ffff8880282f3380 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 78 bytes inside of 96-byte region [ffff8880282f3380, ffff8880282f33e0) The buggy address belongs to the physical page: page:ffffea0000a0bcc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880282f3600 pfn:0x282f3 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001d97348 ffffea0000793ac8 ffff888012040300 raw: ffff8880282f3600 ffff8880282f3000 000000010000001a 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 0x342220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 3727, tgid 3727 (kworker/0:5), ts 307572253660, free_ts 307516976843 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_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2570 cache_alloc_refill+0x27f/0x380 mm/slab.c:2943 ____cache_alloc mm/slab.c:3019 [inline] ____cache_alloc mm/slab.c:3002 [inline] __do_cache_alloc mm/slab.c:3202 [inline] slab_alloc_node mm/slab.c:3250 [inline] __kmem_cache_alloc_node+0x44a/0x510 mm/slab.c:3549 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 mld_sendpack+0x5de/0xe70 net/ipv6/mcast.c:1809 mld_send_initial_cr.part.0+0x194/0x230 net/ipv6/mcast.c:2239 mld_send_initial_cr net/ipv6/mcast.c:1232 [inline] ipv6_mc_dad_complete+0x1d4/0x690 net/ipv6/mcast.c:2247 addrconf_dad_completed+0x9df/0xd80 net/ipv6/addrconf.c:4228 addrconf_dad_work+0x75d/0x12d0 net/ipv6/addrconf.c:4157 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 slab_destroy mm/slab.c:1615 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1635 cache_flusharray mm/slab.c:3360 [inline] ___cache_free+0x2ac/0x3d0 mm/slab.c:3423 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x184/0x210 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/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/slab.c:3257 [inline] __kmem_cache_alloc_node+0x266/0x510 mm/slab.c:3549 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc+0x4a/0xd0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] kzalloc include/linux/slab.h:689 [inline] fib_create_info+0xdc2/0x4ac0 net/ipv4/fib_semantics.c:1451 fib_table_insert+0x199/0x1be0 net/ipv4/fib_trie.c:1236 fib_magic+0x455/0x540 net/ipv4/fib_frontend.c:1098 fib_add_ifaddr+0x16f/0x540 net/ipv4/fib_frontend.c:1120 fib_netdev_event+0x36d/0x6a0 net/ipv4/fib_frontend.c:1480 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1945 Memory state around the buggy address: ffff8880282f3280: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8880282f3300: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8880282f3380: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff8880282f3400: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8880282f3480: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ==================================================================