================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_iter lib/iov_iter.c:380 [inline] BUG: KASAN: slab-out-of-bounds in copy_page_from_iter_atomic+0x93b/0x1310 lib/iov_iter.c:581 Read of size 2048 at addr ffff888023037800 by task kworker/u4:0/10 CPU: 1 PID: 10 Comm: kworker/u4:0 Not tainted 6.5.0-rc3-syzkaller-00297-gd31e3792919e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 Workqueue: loop0 loop_workfn Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 memcpy_from_iter lib/iov_iter.c:380 [inline] copy_page_from_iter_atomic+0x93b/0x1310 lib/iov_iter.c:581 generic_perform_write+0x392/0x630 mm/filemap.c:3931 generic_file_write_iter+0xaf/0x310 mm/filemap.c:4044 do_iter_write+0x84f/0xde0 fs/read_write.c:860 lo_write_bvec drivers/block/loop.c:249 [inline] lo_write_simple drivers/block/loop.c:271 [inline] do_req_filebacked drivers/block/loop.c:495 [inline] loop_handle_cmd drivers/block/loop.c:1915 [inline] loop_process_work+0x144b/0x2220 drivers/block/loop.c:1950 process_one_work+0x92c/0x12c0 kernel/workqueue.c:2597 worker_thread+0xa63/0x1210 kernel/workqueue.c:2748 kthread+0x2b8/0x350 kernel/kthread.c:389 ret_from_fork+0x2e/0x60 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:296 RIP: 0000:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6118: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:985 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:998 kmalloc include/linux/slab.h:586 [inline] hfsplus_read_wrapper+0x545/0x1330 fs/hfsplus/wrapper.c:178 hfsplus_fill_super+0x38e/0x1c90 fs/hfsplus/super.c:413 mount_bdev+0x276/0x3b0 fs/super.c:1391 legacy_get_tree+0xef/0x190 fs/fs_context.c:611 vfs_get_tree+0x8c/0x270 fs/super.c:1519 do_new_mount+0x28f/0xae0 fs/namespace.c:3335 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2649 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:2763 fib6_info_release include/net/ip6_fib.h:337 [inline] ip6_route_info_create+0xa2c/0x12c0 net/ipv6/route.c:3826 ip6_route_add+0x26/0x120 net/ipv6/route.c:3840 addrconf_add_mroute net/ipv6/addrconf.c:2488 [inline] addrconf_add_dev+0x354/0x500 net/ipv6/addrconf.c:2506 inet6_addr_add+0x1b0/0x9f0 net/ipv6/addrconf.c:2942 inet6_rtm_newaddr+0x85b/0x26e0 net/ipv6/addrconf.c:4938 rtnetlink_rcv_msg+0x82b/0xf50 net/core/rtnetlink.c:6424 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2549 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x7c3/0x990 net/netlink/af_netlink.c:1365 netlink_sendmsg+0xa2a/0xd60 net/netlink/af_netlink.c:1914 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg net/socket.c:748 [inline] __sys_sendto+0x484/0x640 net/socket.c:2134 __do_sys_sendto net/socket.c:2146 [inline] __se_sys_sendto net/socket.c:2142 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2142 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888023037800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of allocated 512-byte region [ffff888023037800, ffff888023037a00) The buggy address belongs to the physical page: page:ffffea00008c0d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23034 head:ffffea00008c0d00 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012841c80 ffffea00005aa100 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5059, tgid 5059 (syz-executor.4), ts 261511037353, free_ts 261447011718 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x31e8/0x3370 mm/page_alloc.c:3221 __alloc_pages+0x255/0x670 mm/page_alloc.c:4477 alloc_slab_page+0x6a/0x160 mm/slub.c:1862 allocate_slab mm/slub.c:2009 [inline] new_slab+0x84/0x2f0 mm/slub.c:2062 ___slab_alloc+0xade/0x1100 mm/slub.c:3215 __slab_alloc mm/slub.c:3314 [inline] __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] __kmem_cache_alloc_node+0x1af/0x270 mm/slub.c:3509 __do_kmalloc_node mm/slab_common.c:984 [inline] __kmalloc+0xa8/0x230 mm/slab_common.c:998 kmalloc include/linux/slab.h:586 [inline] kzalloc include/linux/slab.h:703 [inline] fib6_info_alloc+0x30/0xd0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x446/0x12c0 net/ipv6/route.c:3746 addrconf_f6i_alloc+0x3a4/0x7d0 net/ipv6/route.c:4568 ipv6_add_addr+0x454/0xec0 net/ipv6/addrconf.c:1104 addrconf_add_linklocal+0x348/0xae0 net/ipv6/addrconf.c:3220 addrconf_addr_gen+0x7fa/0xb60 addrconf_dev_config net/ipv6/addrconf.c:3396 [inline] addrconf_init_auto_addrs+0x96a/0xe90 net/ipv6/addrconf.c:3474 addrconf_notify+0xaeb/0x1010 net/ipv6/addrconf.c:3647 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2348 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2443 discard_slab mm/slub.c:2108 [inline] __unfreeze_partials+0x1dc/0x220 mm/slub.c:2647 put_cpu_partial+0x116/0x180 mm/slub.c:2723 __slab_free+0x2b6/0x390 mm/slub.c:3671 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x23/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x6c/0x3b0 mm/slab.h:762 slab_alloc_node mm/slub.c:3470 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x123/0x300 mm/slub.c:3494 getname_flags+0xbc/0x4e0 fs/namei.c:140 getname fs/namei.c:219 [inline] __do_sys_symlinkat fs/namei.c:4519 [inline] __se_sys_symlinkat fs/namei.c:4516 [inline] __x64_sys_symlinkat+0x7c/0xb0 fs/namei.c:4516 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888023037900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888023037980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888023037a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888023037a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888023037b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================