================================================================== BUG: KASA BUG: KASAN: slab-out-of-bounds in blk_mq_free_rqs+0xde/0x680 block/blk-mq.c:-1 Read of size 8 at addr ffff888027ef3a88 by task kworker/u8:2/30053 CPU: 1 UID: 0 PID: 30053 Comm: kworker/u8:2 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Workqueue: nbd-del nbd_dev_remove_work 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+0xde/0x680 block/blk-mq.c:-1 blk_mq_free_map_and_rqs+0x40/0xf0 block/blk-mq.c:4159 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/0x5c0 block/elevator.c:639 elevator_change+0x34f/0x480 block/elevator.c:685 elevator_set_none+0xb5/0x140 block/elevator.c:769 blk_unregister_queue+0x176/0x210 block/blk-sysfs.c:1073 __del_gendisk+0x414/0x920 block/genhd.c:747 del_gendisk+0xe7/0x160 block/genhd.c:827 nbd_dev_remove drivers/block/nbd.c:269 [inline] nbd_dev_remove_work+0x47/0xe0 drivers/block/nbd.c:285 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x480 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:409 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5414 [inline] __kmalloc_node_noprof+0x4b9/0x720 mm/slub.c:5426 _kmalloc_array_node_noprof include/linux/slab.h:1297 [inline] blk_mq_alloc_tag_set+0x533/0x1000 block/blk-mq.c:4905 nbd_dev_add+0x30e/0xb60 drivers/block/nbd.c:1975 nbd_init+0x168/0x1f0 drivers/block/nbd.c:2743 do_one_initcall+0x250/0x870 init/main.c:1362 do_initcall_level+0x10a/0x1a0 init/main.c:1424 do_initcalls+0x59/0xa0 init/main.c:1440 kernel_init_freeable+0x29d/0x3e0 init/main.c:1675 kernel_init+0x22/0x1d0 init/main.c:1565 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 ffff888027ef3a80 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 [ffff888027ef3a80, ffff888027ef3a88) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27ef3 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801c041500 dead000000000100 dead000000000122 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 0xd2c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 6850179546 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab+0x7d/0x620 mm/slub.c:3462 new_slab mm/slub.c:3513 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7418 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __do_kmalloc_node mm/slub.c:5413 [inline] __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545 __kmemdup_nul mm/util.c:64 [inline] kstrdup+0x42/0x100 mm/util.c:84 __kernfs_new_node+0xa9/0x980 fs/kernfs/dir.c:661 kernfs_new_node fs/kernfs/dir.c:751 [inline] kernfs_create_dir_ns+0xfe/0x230 fs/kernfs/dir.c:1120 sysfs_create_dir_ns+0x12f/0x2a0 fs/sysfs/dir.c:59 create_dir lib/kobject.c:73 [inline] kobject_add_internal+0x622/0xcd0 lib/kobject.c:240 kobject_add_varg lib/kobject.c:374 [inline] kobject_add+0x163/0x240 lib/kobject.c:426 device_add+0x3fa/0xb80 drivers/base/core.c:3699 __add_disk+0x517/0xdb0 block/genhd.c:499 add_disk_fwnode+0x100/0x3a0 block/genhd.c:600 page_owner free stack trace missing Memory state around the buggy address: ffff888027ef3980: 05 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ffff888027ef3a00: 05 fc fc fc 00 fc fc fc 05 fc fc fc 00 fc fc fc >ffff888027ef3a80: 00 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ^ ffff888027ef3b00: 05 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ffff888027ef3b80: 05 fc fc fc 00 fc fc fc 06 fc fc fc 00 fc fc fc ==================================================================