================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x1c1/0x590 lib/iov_iter.c:633 Read of size 4 at addr ffff888027d68778 by task kworker/u8:5/1106 CPU: 0 UID: 0 PID: 1106 Comm: kworker/u8:5 Not tainted 6.14.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: events_unbound netfs_write_collection_worker Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 iov_iter_revert+0x1c1/0x590 lib/iov_iter.c:633 netfs_retry_write_stream fs/netfs/write_retry.c:44 [inline] netfs_retry_writes+0x17db/0x19b0 fs/netfs/write_retry.c:231 netfs_collect_write_results fs/netfs/write_collect.c:352 [inline] netfs_write_collection_worker+0x2f90/0x3bc0 fs/netfs/write_collect.c:374 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd30 kernel/workqueue.c:3400 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 5869: 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:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4325 kmalloc_noprof include/linux/slab.h:901 [inline] add_stack_record_to_list mm/page_owner.c:172 [inline] inc_stack_record_count mm/page_owner.c:214 [inline] __set_page_owner+0x2ad/0x530 mm/page_owner.c:329 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4740 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __do_kmalloc_node mm/slub.c:4293 [inline] __kmalloc_node_track_caller_noprof+0x2e9/0x4c0 mm/slub.c:4313 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:537 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:606 skb_copy+0x19d/0x9c0 net/core/skbuff.c:2069 mac80211_hwsim_tx_frame_no_nl+0xedd/0x15c0 drivers/net/wireless/virtual/mac80211_hwsim.c:1866 mac80211_hwsim_tx+0x1837/0x23c0 drivers/net/wireless/virtual/mac80211_hwsim.c:2084 drv_tx net/mac80211/driver-ops.h:37 [inline] wake_tx_push_queue net/mac80211/util.c:298 [inline] ieee80211_handle_wake_tx_queue+0x1ae/0x2d0 net/mac80211/util.c:315 drv_wake_tx_queue net/mac80211/driver-ops.h:1366 [inline] schedule_and_wake_txq net/mac80211/driver-ops.h:1373 [inline] ieee80211_queue_skb+0x1ae9/0x24b0 net/mac80211/tx.c:1664 ieee80211_tx+0x2c4/0x470 net/mac80211/tx.c:1967 __ieee80211_subif_start_xmit+0xe65/0x15a0 net/mac80211/tx.c:4339 ieee80211_subif_start_xmit+0xde/0x4d0 net/mac80211/tx.c:4533 __netdev_start_xmit include/linux/netdevice.h:5151 [inline] netdev_start_xmit include/linux/netdevice.h:5160 [inline] xmit_one net/core/dev.c:3800 [inline] dev_hard_start_xmit+0x27a/0x7d0 net/core/dev.c:3816 __dev_queue_xmit+0x1b73/0x3f50 net/core/dev.c:4652 neigh_output include/net/neighbour.h:539 [inline] ip6_finish_output2+0x12bc/0x17c0 net/ipv6/ip6_output.c:141 ip6_finish_output+0x41e/0x840 net/ipv6/ip6_output.c:226 NF_HOOK+0x9e/0x430 include/linux/netfilter.h:314 mld_sendpack+0x843/0xdb0 net/ipv6/mcast.c:1868 mld_send_cr net/ipv6/mcast.c:2169 [inline] mld_ifc_work+0x7d9/0xd90 net/ipv6/mcast.c:2702 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd30 kernel/workqueue.c:3400 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888027d68760 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 8 bytes to the right of allocated 16-byte region [ffff888027d68760, ffff888027d68770) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27d68 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b041640 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000800080 00000000f5000000 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 36, tgid 36 (kworker/u8:2), ts 11602775178, free_ts 11435765758 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4740 alloc_slab_page mm/slub.c:2425 [inline] allocate_slab+0x66/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __do_kmalloc_node mm/slub.c:4293 [inline] __kmalloc_node_noprof+0x2ee/0x4d0 mm/slub.c:4300 kmalloc_array_node_noprof include/linux/slab.h:1018 [inline] blk_mq_alloc_hctx block/blk-mq.c:3971 [inline] blk_mq_alloc_and_init_hctx+0x47b/0xd50 block/blk-mq.c:4448 blk_mq_realloc_hw_ctxs+0x19c/0xb00 block/blk-mq.c:4481 blk_mq_init_allocated_queue+0x3f6/0x14c0 block/blk-mq.c:4535 blk_mq_alloc_queue+0x198/0x290 block/blk-mq.c:4348 scsi_alloc_sdev+0x76c/0xb80 drivers/scsi/scsi_scan.c:338 scsi_probe_and_add_lun+0x1d2/0x4b30 drivers/scsi/scsi_scan.c:1209 __scsi_scan_target+0x205/0x1080 drivers/scsi/scsi_scan.c:1774 scsi_scan_channel drivers/scsi/scsi_scan.c:1862 [inline] scsi_scan_host_selected+0x37e/0x690 drivers/scsi/scsi_scan.c:1891 do_scsi_scan_host drivers/scsi/scsi_scan.c:2030 [inline] do_scan_async+0x138/0x7a0 drivers/scsi/scsi_scan.c:2040 page last free pid 26 tgid 26 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe04/0x10e0 mm/page_alloc.c:2660 vfree+0x1c3/0x360 mm/vmalloc.c:3383 delayed_vfree_work+0x56/0x80 mm/vmalloc.c:3303 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd30 kernel/workqueue.c:3400 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888027d68600: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ffff888027d68680: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc >ffff888027d68700: 00 00 fc fc 00 00 fc fc fa fb fc fc 00 00 fc fc ^ ffff888027d68780: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ffff888027d68800: 00 00 fc fc fa fb fc fc 00 00 fc fc 00 00 fc fc ==================================================================