cfg80211: failed to load regulatory.db ================================================================== BUG: KASAN: slab-out-of-bounds in _copy_to_iter+0xd14/0x1140 lib/iov_iter.c:527 Write of size 17 at addr ffff88807b38f3c7 by task kworker/1:2/144 CPU: 1 PID: 144 Comm: kworker/1:2 Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Workqueue: events p9_read_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 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+0xbb/0x1f0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memcpy+0x39/0x60 mm/kasan/shadow.c:66 _copy_to_iter+0xd14/0x1140 lib/iov_iter.c:527 copy_page_to_iter+0xdc/0xa20 lib/iov_iter.c:725 pipe_read+0x50a/0x1100 fs/pipe.c:307 __kernel_read+0x2c6/0x7c0 fs/read_write.c:428 kernel_read+0xbf/0x1c0 fs/read_write.c:446 p9_fd_read net/9p/trans_fd.c:266 [inline] p9_read_work+0x2ac/0x1040 net/9p/trans_fd.c:301 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 4245: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 kasan_set_track+0x21/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa1/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0x54/0xc0 mm/slab_common.c:968 kmalloc include/linux/slab.h:581 [inline] p9_fcall_init+0x97/0x210 net/9p/client.c:228 p9_tag_alloc+0x208/0x840 net/9p/client.c:293 p9_client_prepare_req+0x177/0x590 net/9p/client.c:631 p9_client_rpc+0x1a1/0xd70 net/9p/client.c:678 p9_client_walk+0x19c/0x540 net/9p/client.c:1152 v9fs_vfs_lookup.part.0+0x143/0x5d0 fs/9p/vfs_inode.c:777 v9fs_vfs_lookup+0x69/0x90 fs/9p/vfs_inode.c:762 __lookup_slow+0x24c/0x460 fs/namei.c:1685 lookup_slow fs/namei.c:1702 [inline] walk_component+0x33f/0x5a0 fs/namei.c:1993 lookup_last fs/namei.c:2450 [inline] path_lookupat+0x1ba/0x840 fs/namei.c:2474 filename_lookup+0x1ce/0x590 fs/namei.c:2503 kern_path+0x34/0x50 fs/namei.c:2593 unix_find_bsd net/unix/af_unix.c:1056 [inline] unix_find_other+0xf2/0x810 net/unix/af_unix.c:1117 unix_dgram_sendmsg+0xc47/0x1b50 net/unix/af_unix.c:1968 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 ____sys_sendmsg+0x334/0x8c0 net/socket.c:2482 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2536 __sys_sendmmsg+0x18b/0x460 net/socket.c:2622 __do_sys_sendmmsg net/socket.c:2651 [inline] __se_sys_sendmmsg net/socket.c:2648 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2648 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88807b38f3c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 7 bytes inside of 32-byte region [ffff88807b38f3c0, ffff88807b38f3e0) The buggy address belongs to the physical page: page:ffffea0001ece3c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807b38fc00 pfn:0x7b38f flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001fe2580 dead000000000003 ffff888011841500 raw: ffff88807b38fc00 000000008040003b 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 3619, tgid 3619 (syz-executor.4), ts 62836787921, free_ts 28843675456 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4287 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5554 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x213/0x300 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+0x191/0x3e0 mm/slub.c:3437 kmalloc_trace+0x22/0x60 mm/slab_common.c:1046 kmalloc include/linux/slab.h:576 [inline] kzalloc include/linux/slab.h:712 [inline] ref_tracker_alloc+0x14c/0x550 lib/ref_tracker.c:85 __netdev_tracker_alloc include/linux/netdevice.h:3995 [inline] netdev_hold include/linux/netdevice.h:4024 [inline] netdev_hold include/linux/netdevice.h:4019 [inline] rx_queue_add_kobject net/core/net-sysfs.c:1060 [inline] net_rx_queue_update_kobjects+0x20a/0x510 net/core/net-sysfs.c:1114 register_queue_kobjects net/core/net-sysfs.c:1774 [inline] netdev_register_kobject+0x275/0x400 net/core/net-sysfs.c:2019 register_netdevice+0xd95/0x1670 net/core/dev.c:10057 macvlan_common_newlink+0xe96/0x1760 drivers/net/macvlan.c:1512 macvtap_newlink drivers/net/macvtap.c:109 [inline] macvtap_newlink+0x190/0x260 drivers/net/macvtap.c:81 rtnl_newlink_create net/core/rtnetlink.c:3364 [inline] __rtnl_newlink+0x1087/0x17e0 net/core/rtnetlink.c:3581 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3594 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1458 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1508 free_unref_page_prepare mm/page_alloc.c:3386 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3482 __folio_put_small mm/swap.c:105 [inline] __folio_put+0xc1/0x130 mm/swap.c:128 folio_put include/linux/mm.h:1159 [inline] put_page include/linux/mm.h:1211 [inline] anon_pipe_buf_release+0x3f7/0x4b0 fs/pipe.c:138 pipe_buf_release include/linux/pipe_fs_i.h:183 [inline] pipe_read+0x610/0x1100 fs/pipe.c:324 call_read_iter include/linux/fs.h:2185 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x7f6/0x930 fs/read_write.c:470 ksys_read+0x1e8/0x250 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88807b38f280: 00 00 04 fc fc fc fc fc 00 00 00 00 fc fc fc fc ffff88807b38f300: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc >ffff88807b38f380: 00 00 00 00 fc fc fc fc 00 00 06 fc fc fc fc fc ^ ffff88807b38f400: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff88807b38f480: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ==================================================================