================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_iter lib/iov_iter.c:73 [inline] BUG: KASAN: slab-out-of-bounds in iterate_bvec include/linux/iov_iter.h:122 [inline] BUG: KASAN: slab-out-of-bounds in iterate_and_advance2 include/linux/iov_iter.h:249 [inline] BUG: KASAN: slab-out-of-bounds in iterate_and_advance include/linux/iov_iter.h:271 [inline] BUG: KASAN: slab-out-of-bounds in __copy_from_iter lib/iov_iter.c:249 [inline] BUG: KASAN: slab-out-of-bounds in copy_page_from_iter_atomic+0x954/0x1db0 lib/iov_iter.c:481 Read of size 2048 at addr ffff88802c39a000 by task kworker/u8:8/2916 CPU: 0 PID: 2916 Comm: kworker/u8:8 Not tainted 6.9.0-rc4-syzkaller-00214-g13a2e429f644 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: loop0 loop_workfn Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 memcpy_from_iter lib/iov_iter.c:73 [inline] iterate_bvec include/linux/iov_iter.h:122 [inline] iterate_and_advance2 include/linux/iov_iter.h:249 [inline] iterate_and_advance include/linux/iov_iter.h:271 [inline] __copy_from_iter lib/iov_iter.c:249 [inline] copy_page_from_iter_atomic+0x954/0x1db0 lib/iov_iter.c:481 generic_perform_write+0x39b/0x640 mm/filemap.c:3982 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2920 do_iter_readv_writev+0x5a4/0x800 vfs_iter_write+0x244/0x5d0 fs/read_write.c:895 lo_write_bvec drivers/block/loop.c:246 [inline] lo_write_simple drivers/block/loop.c:267 [inline] do_req_filebacked drivers/block/loop.c:491 [inline] loop_handle_cmd drivers/block/loop.c:1907 [inline] loop_process_work+0x13a3/0x1e60 drivers/block/loop.c:1942 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3335 worker_thread+0x86d/0xd70 kernel/workqueue.c:3416 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 8543: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3966 [inline] __kmalloc+0x233/0x4a0 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] hfsplus_read_wrapper+0x545/0x1340 fs/hfsplus/wrapper.c:179 hfsplus_fill_super+0x38e/0x1ca0 fs/hfsplus/super.c:419 mount_bdev+0x20a/0x2d0 fs/super.c:1658 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1779 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88802c39a000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of allocated 512-byte region [ffff88802c39a000, ffff88802c39a200) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c398 head: order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff80000000840(slab|head|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffffff() raw: 00fff80000000840 ffff888015041c80 ffffea0000b45500 dead000000000002 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 head: 00fff80000000840 ffff888015041c80 ffffea0000b45500 dead000000000002 head: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 head: 00fff80000000002 ffffea0000b0e601 ffffea0000b0e648 00000000ffffffff head: 0000000400000000 0000000000000000 00000000ffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4525, tgid 6027328 (udevd), ts 4525, free_ts 64380278278 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317 __alloc_pages+0x256/0x6c0 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page+0x5f/0x160 mm/slub.c:2175 allocate_slab mm/slub.c:2338 [inline] new_slab+0x84/0x2f0 mm/slub.c:2391 ___slab_alloc+0xc73/0x1260 mm/slub.c:3525 __slab_alloc mm/slub.c:3610 [inline] __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] kmalloc_trace+0x269/0x360 mm/slub.c:3992 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] kernfs_fop_open+0x3e0/0xd10 fs/kernfs/file.c:623 do_dentry_open+0x907/0x15a0 fs/open.c:955 do_open fs/namei.c:3642 [inline] path_openat+0x2860/0x3240 fs/namei.c:3799 do_filp_open+0x235/0x490 fs/namei.c:3826 do_sys_openat2+0x13e/0x1d0 fs/open.c:1406 do_sys_open fs/open.c:1421 [inline] __do_sys_openat fs/open.c:1437 [inline] __se_sys_openat fs/open.c:1432 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1432 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5094 tgid 5094 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x97b/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 __slab_free+0x31b/0x3d0 mm/slub.c:4192 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x5e/0xc0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3798 [inline] slab_alloc_node mm/slub.c:3845 [inline] kmalloc_trace+0x16f/0x360 mm/slub.c:3992 kmalloc include/linux/slab.h:628 [inline] netdev_name_node_alloc net/core/dev.c:239 [inline] netdev_name_node_head_alloc net/core/dev.c:253 [inline] register_netdevice+0x4e2/0x1a20 net/core/dev.c:10204 veth_newlink+0x84f/0xcd0 drivers/net/veth.c:1859 rtnl_newlink_create net/core/rtnetlink.c:3494 [inline] __rtnl_newlink net/core/rtnetlink.c:3714 [inline] rtnl_newlink+0x158f/0x20a0 net/core/rtnetlink.c:3727 rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6595 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x8e1/0xcb0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 __sys_sendto+0x3a4/0x4f0 net/socket.c:2191 Memory state around the buggy address: ffff88802c39a100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802c39a180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802c39a200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802c39a280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802c39a300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================