================================================================== BUG: KASAN: slab-out-of-bounds in blk_mq_free_rqs+0xea/0x680 block/blk-mq.c:-1 Read of size 8 at addr ffff88802755c4c8 by task kworker/u8:30/10896 CPU: 0 UID: 0 PID: 10896 Comm: kworker/u8:30 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Workqueue: nbd-del nbd_dev_remove_work Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 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_unregister_queue+0x17d/0x210 block/blk-sysfs.c:1068 __del_gendisk+0x3fd/0x980 block/genhd.c:743 del_gendisk+0xe7/0x160 block/genhd.c:823 nbd_dev_remove drivers/block/nbd.c:268 [inline] nbd_dev_remove_work+0x47/0xe0 drivers/block/nbd.c:284 process_one_work kernel/workqueue.c:3288 [inline] process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3371 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3452 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 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:5260 [inline] __kmalloc_node_noprof+0x4e0/0x7c0 mm/slub.c:5266 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 ffff88802755c4c0 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 [ffff88802755c4c0, ffff88802755c4c8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2755c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88813fe2c500 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 0xd2c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 6751046582, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_slab_page mm/slub.c:3292 [inline] allocate_slab+0x77/0x660 mm/slub.c:3481 new_slab mm/slub.c:3539 [inline] refill_objects+0x331/0x3c0 mm/slub.c:7175 refill_sheaf mm/slub.c:2812 [inline] __pcs_replace_empty_main+0x2e6/0x730 mm/slub.c:4615 alloc_from_pcs mm/slub.c:4717 [inline] slab_alloc_node mm/slub.c:4851 [inline] __do_kmalloc_node mm/slub.c:5259 [inline] __kmalloc_node_track_caller_noprof+0x572/0x7b0 mm/slub.c:5368 kvasprintf+0xeb/0x1a0 lib/kasprintf.c:25 kobject_set_name_vargs+0x61/0x110 lib/kobject.c:274 kobject_add_varg lib/kobject.c:368 [inline] kobject_add+0x121/0x240 lib/kobject.c:426 blk_mq_register_hctx+0x1d7/0x400 block/blk-mq-sysfs.c:173 blk_mq_sysfs_register+0x14e/0x540 block/blk-mq-sysfs.c:235 blk_register_queue+0xd0/0x4e0 block/blk-sysfs.c:958 __add_disk+0x677/0xd50 block/genhd.c:528 add_disk_fwnode+0xfb/0x480 block/genhd.c:597 add_disk include/linux/blkdev.h:794 [inline] loop_add+0x85e/0xb40 drivers/block/loop.c:2092 page_owner free stack trace missing Memory state around the buggy address: ffff88802755c380: 05 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ffff88802755c400: 05 fc fc fc 05 fc fc fc 05 fc fc fc 00 fc fc fc >ffff88802755c480: 04 fc fc fc 00 fc fc fc 00 fc fc fc 06 fc fc fc ^ ffff88802755c500: 06 fc fc fc 04 fc fc fc 04 fc fc fc 04 fc fc fc ffff88802755c580: 04 fc fc fc 04 fc fc fc 04 fc fc fc 04 fc fc fc ==================================================================