================================================================== BUG: KASAN: slab-out-of-bounds in blk_mq_free_rqs+0xea/0x680 block/blk-mq.c:-1 Read of size 8 at addr ffff888026546c88 by task syz.1.1075/9684 CPU: 1 UID: 0 PID: 9684 Comm: syz.1.1075 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 blk_mq_free_rqs+0xea/0x680 block/blk-mq.c:-1 blk_mq_free_map_and_rqs+0x40/0xf0 block/blk-mq.c:4178 blk_mq_free_sched_tags block/blk-mq-sched.c:425 [inline] blk_mq_free_sched_res+0xeb/0x280 block/blk-mq-sched.c:436 elevator_change_done+0x1d2/0x5f0 block/elevator.c:639 elevator_change+0x321/0x450 block/elevator.c:685 elevator_set_none+0xb5/0x140 block/elevator.c:769 blk_mq_elv_switch_none block/blk-mq.c:5131 [inline] __blk_mq_update_nr_hw_queues block/blk-mq.c:5176 [inline] blk_mq_update_nr_hw_queues+0x5e7/0x1a60 block/blk-mq.c:5241 nbd_start_device+0x17f/0xb10 drivers/block/nbd.c:1489 nbd_genl_connect+0x165b/0x1cf0 drivers/block/nbd.c:2239 genl_family_rcv_msg_doit+0x22a/0x330 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x61c/0x7a0 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2551 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x75c/0x8e0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1895 sock_sendmsg_nosec net/socket.c:787 [inline] __sock_sendmsg net/socket.c:802 [inline] ____sys_sendmsg+0x972/0x9f0 net/socket.c:2698 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2752 __sys_sendmsg net/socket.c:2784 [inline] __do_sys_sendmsg net/socket.c:2789 [inline] __se_sys_sendmsg net/socket.c:2787 [inline] __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2787 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f14fd59cdd9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f14fe4d1028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f14fd816090 RCX: 00007f14fd59cdd9 RDX: 0000000020000000 RSI: 0000200000001ac0 RDI: 0000000000000005 RBP: 00007f14fd632d69 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f14fd816128 R14: 00007f14fd816090 R15: 00007ffdda7cb9e8 Allocated by task 1: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5295 [inline] __kmalloc_node_noprof+0x4e0/0x7c0 mm/slub.c:5301 kmalloc_array_node_noprof include/linux/slab.h:1169 [inline] blk_mq_alloc_tag_set+0x4e3/0xfc0 block/blk-mq.c:4924 nbd_dev_add+0x30e/0xb50 drivers/block/nbd.c:1933 nbd_init+0x168/0x1f0 drivers/block/nbd.c:2692 do_one_initcall+0x250/0x870 init/main.c:1392 do_initcall_level+0x104/0x190 init/main.c:1454 do_initcalls+0x59/0xa0 init/main.c:1470 kernel_init_freeable+0x2a6/0x3e0 init/main.c:1703 kernel_init+0x1d/0x1d0 init/main.c:1593 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888026546c80 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes to the right of allocated 8-byte region [ffff888026546c80, ffff888026546c88) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26546 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88813fe1a500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800800080 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 5564038233, free_ts 4965659901 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab+0x77/0x660 mm/slub.c:3467 new_slab mm/slub.c:3525 [inline] refill_objects+0x339/0x3d0 mm/slub.c:7255 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x321/0x720 mm/slub.c:4651 alloc_from_pcs mm/slub.c:4749 [inline] slab_alloc_node mm/slub.c:4883 [inline] __do_kmalloc_node mm/slub.c:5294 [inline] __kmalloc_node_noprof+0x577/0x7c0 mm/slub.c:5301 kmalloc_array_node_noprof include/linux/slab.h:1169 [inline] blk_mq_alloc_tag_set+0x5a4/0xfc0 block/blk-mq.c:4931 loop_add+0x43c/0xb40 drivers/block/loop.c:2045 loop_init+0xd9/0x170 drivers/block/loop.c:2288 do_one_initcall+0x250/0x870 init/main.c:1392 do_initcall_level+0x104/0x190 init/main.c:1454 do_initcalls+0x59/0xa0 init/main.c:1470 kernel_init_freeable+0x2a6/0x3e0 init/main.c:1703 kernel_init+0x1d/0x1d0 init/main.c:1593 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 page last free pid 10 tgid 10 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] __free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2943 vfree+0x1d1/0x2f0 mm/vmalloc.c:3472 delayed_vfree_work+0x55/0x80 mm/vmalloc.c:3392 process_one_work kernel/workqueue.c:3302 [inline] process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3385 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3466 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888026546b80: 05 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ffff888026546c00: 02 fc fc fc 02 fc fc fc 07 fc fc fc 05 fc fc fc >ffff888026546c80: 00 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ^ ffff888026546d00: 05 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ffff888026546d80: 02 fc fc fc 02 fc fc fc 07 fc fc fc 05 fc fc fc ==================================================================