================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_page include/linux/highmem.h:393 [inline] BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read fs/hfsplus/bnode.c:32 [inline] BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read_key+0x390/0x600 fs/hfsplus/bnode.c:70 Write of size 4026 at addr ffff88805aa15000 by task syz-executor.3/8704 CPU: 0 PID: 8704 Comm: syz-executor.3 Not tainted 6.1.86-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 kasan_check_range+0x27f/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 memcpy_from_page include/linux/highmem.h:393 [inline] hfsplus_bnode_read fs/hfsplus/bnode.c:32 [inline] hfsplus_bnode_read_key+0x390/0x600 fs/hfsplus/bnode.c:70 hfsplus_brec_insert+0x6e6/0xdd0 fs/hfsplus/brec.c:141 hfsplus_create_attr+0x49a/0x630 fs/hfsplus/attributes.c:252 __hfsplus_setxattr+0x6fa/0x22c0 fs/hfsplus/xattr.c:354 hfsplus_setxattr+0xac/0xe0 fs/hfsplus/xattr.c:434 hfsplus_user_setxattr+0x3c/0x50 fs/hfsplus/xattr_user.c:30 __vfs_setxattr+0x3e7/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216 vfs_setxattr+0x21d/0x420 fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x250/0x2b0 fs/xattr.c:617 path_setxattr+0x1bc/0x2a0 fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:648 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fd945e7de69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd946bf40c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007fd945fabf80 RCX: 00007fd945e7de69 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 00000000200001c0 RBP: 00007fd945eca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fd945fabf80 R15: 00007ffec6694348 Allocated by task 8704: 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+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xb2/0x230 mm/slab_common.c:968 kmalloc include/linux/slab.h:561 [inline] hfsplus_find_init+0x81/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_create_attr+0x15d/0x630 fs/hfsplus/attributes.c:216 __hfsplus_setxattr+0x6fa/0x22c0 fs/hfsplus/xattr.c:354 hfsplus_setxattr+0xac/0xe0 fs/hfsplus/xattr.c:434 hfsplus_user_setxattr+0x3c/0x50 fs/hfsplus/xattr_user.c:30 __vfs_setxattr+0x3e7/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216 vfs_setxattr+0x21d/0x420 fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x250/0x2b0 fs/xattr.c:617 path_setxattr+0x1bc/0x2a0 fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:648 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 kvfree_call_rcu+0x116/0x8c0 kernel/rcu/tree.c:3400 neigh_del net/core/neighbour.c:225 [inline] neigh_remove_one+0x5c6/0x6d0 net/core/neighbour.c:246 neigh_forced_gc net/core/neighbour.c:279 [inline] neigh_alloc net/core/neighbour.c:485 [inline] ___neigh_create+0x459/0x24b0 net/core/neighbour.c:648 ip6_finish_output2+0x14f2/0x1530 net/ipv6/ip6_output.c:125 __ip6_finish_output net/ipv6/ip6_output.c:201 [inline] ip6_finish_output+0x6a0/0xa80 net/ipv6/ip6_output.c:212 dst_output include/net/dst.h:444 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ndisc_send_skb+0xbab/0x14e0 net/ipv6/ndisc.c:509 addrconf_rs_timer+0x357/0x610 net/ipv6/addrconf.c:3961 call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1504 expire_timers kernel/time/timer.c:1549 [inline] __run_timers+0x67c/0x890 kernel/time/timer.c:1820 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 The buggy address belongs to the object at ffff88805aa15000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff88805aa15000, ffff88805aa15400) The buggy address belongs to the physical page: page:ffffea00016a8400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5aa10 head:ffffea00016a8400 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff80000010200(slab|head|node=0|zone=1|lastcpupid=0xfff) raw: 00fff80000010200 0000000000000000 dead000000000001 ffff888012441dc0 raw: 0000000000000000 0000000080100010 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 0x152a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 46, tgid 46 (kworker/u4:3), ts 99945165502, free_ts 99912540565 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513 prep_new_page mm/page_alloc.c:2520 [inline] get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc+0xa1/0x230 mm/slab_common.c:968 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:692 [inline] ieee802_11_parse_elems_full+0xc4/0x1380 net/mac80211/util.c:1503 ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2247 [inline] ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2254 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1605 [inline] ieee80211_ibss_rx_queued_mgmt+0x430/0x2dd0 net/mac80211/ibss.c:1638 ieee80211_iface_process_skb net/mac80211/iface.c:1632 [inline] ieee80211_iface_work+0x7aa/0xce0 net/mac80211/iface.c:1686 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1440 [inline] free_pcp_prepare mm/page_alloc.c:1490 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3358 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3453 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x156/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] kmem_cache_alloc_node+0x136/0x310 mm/slub.c:3443 __alloc_skb+0xde/0x670 net/core/skbuff.c:505 alloc_skb_fclone include/linux/skbuff.h:1321 [inline] tcp_stream_alloc_skb+0x3e/0x310 net/ipv4/tcp.c:868 tcp_sendmsg_locked+0xda6/0x4100 net/ipv4/tcp.c:1331 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1489 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] sock_write_iter+0x394/0x4e0 net/socket.c:1143 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ae/0xba0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88805aa15100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805aa15180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805aa15200: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805aa15280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805aa15300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================