syzbot


KASAN: slab-out-of-bounds Read in blk_mq_free_rqs

Status: upstream: reported on 2026/04/23 17:45
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+e90526cab23b9efcd03c@syzkaller.appspotmail.com
First crash: 45d, last: 1d04h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [block?] KASAN: slab-out-of-bounds Read in blk_mq_free_rqs 0 (1) 2026/04/23 17:45
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in blk_mq_free_rqs 2 C inconclusive inconclusive 14 1069d 1539d 0/29 auto-obsoleted due to no activity on 2025/11/23 18:25

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in blk_mq_free_rqs+0xea/0x680 block/blk-mq.c:-1
Read of size 8 at addr ffff888026f0cc68 by task kworker/u8:7/179

CPU: 1 UID: 0 PID: 179 Comm: kworker/u8:7 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: nbd-del nbd_dev_remove_work
Call Trace:
 <TASK>
 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_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: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
 </TASK>

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+0x377/0x7f0 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 ffff888026f0cc60
 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 [ffff888026f0cc60, ffff888026f0cc68)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888026f0c0c0 pfn:0x26f0c
flags: 0x80000000000200(workingset|node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000200 ffff88801a00b500 ffffea0000ab5a10 ffffea00009422d0
raw: ffff888026f0c0c0 0000000800800072 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 0xd2c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 33, tgid 33 (kdevtmpfs), ts 6970547136, free_ts 6944814984
 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+0x27c8/0x2840 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+0x33c/0x3d0 mm/slub.c:7251
 refill_sheaf mm/slub.c:2816 [inline]
 __pcs_replace_empty_main+0x373/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_track_caller_noprof+0x60b/0x7e0 mm/slub.c:5403
 kmemdup_noprof+0x2b/0x70 mm/util.c:138
 kmemdup_noprof include/linux/fortify-string.h:763 [inline]
 xattr_dupval security/smack/smack_lsm.c:992 [inline]
 smack_inode_init_security+0x459/0x600 security/smack/smack_lsm.c:1070
 security_inode_init_security+0x202/0x3d0 security/security.c:1354
 shmem_mknod+0x1fe/0x360 mm/shmem.c:3868
 vfs_mknod+0x44e/0x620 fs/namei.c:5120
 handle_create drivers/base/devtmpfs.c:232 [inline]
 handle drivers/base/devtmpfs.c:384 [inline]
 devtmpfs_work_loop+0x861/0xdf0 drivers/base/devtmpfs.c:399
 devtmpfsd+0x4d/0x50 drivers/base/devtmpfs.c:441
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
page last free pid 179 tgid 179 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1402 [inline]
 __free_frozen_pages+0xfa6/0x10f0 mm/page_alloc.c:2943
 __kasan_populate_vmalloc_do mm/kasan/shadow.c:393 [inline]
 __kasan_populate_vmalloc+0x1b2/0x1d0 mm/kasan/shadow.c:424
 kasan_populate_vmalloc include/linux/kasan.h:580 [inline]
 alloc_vmap_area+0xd47/0x1480 mm/vmalloc.c:2123
 __get_vm_area_node+0x226/0x350 mm/vmalloc.c:3226
 __vmalloc_node_range_noprof+0x36a/0x1750 mm/vmalloc.c:4024
 __vmalloc_node_noprof+0xc2/0x100 mm/vmalloc.c:4124
 alloc_thread_stack_node kernel/fork.c:357 [inline]
 dup_task_struct+0x298/0x840 kernel/fork.c:926
 copy_process+0x89b/0x4460 kernel/fork.c:2088
 kernel_clone+0x283/0x870 kernel/fork.c:2723
 user_mode_thread+0x110/0x180 kernel/fork.c:2799
 call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171
 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:
 ffff888026f0cb00: fa fc fc fc fa fc fc fc 05 fc fc fc fa fc fc fc
 ffff888026f0cb80: 07 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc
>ffff888026f0cc00: 00 fc fc fc fa fc fc fc 00 fc fc fc 00 fc fc fc
                                                          ^
 ffff888026f0cc80: 07 fc fc fc 07 fc fc fc fa fc fc fc fa fc fc fc
 ffff888026f0cd00: 00 fc fc fc 00 fc fc fc 07 fc fc fc 07 fc fc fc
==================================================================

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/29 05:53 upstream dca922e019dd 95008c03 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
2026/03/19 14:30 upstream 8a30aeb0d1b4 bd6dcb30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
2026/03/15 20:01 upstream 267594792a71 ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
2026/03/22 05:36 upstream 113ae7b4decc 5b92003d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
2026/03/21 16:17 net bc0151c59e63 5b92003d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
2026/04/28 12:33 net-next 790ead939486 b4209743 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
2026/04/25 22:52 net-next e728258debd5 9c2d0995 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
2026/04/24 21:27 net-next e728258debd5 1c2b9291 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
2026/04/23 17:44 net-next 1f5ffc672165 4c3406dc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in blk_mq_free_rqs
* Struck through repros no longer work on HEAD.