UBSAN: shift-out-of-bounds in null_process_zoned_cmd

Status: upstream: reported on 2026/08/06 15:37
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+abd6a8dca0f2b7726060@syzkaller.appspotmail.com
First crash: 3d11h, last: 2d03h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd 0 (1) 2026/08/06 15:37
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 UBSAN: shift-out-of-bounds in null_process_zoned_cmd -1 2 3d05h 3d05h 0/3 upstream: reported on 2026/08/04 19:02

Sample crash report:
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/block/null_blk/zoned.c:21:14
shift exponent -1 is negative
CPU: 0 UID: 0 PID: 5906 Comm: syz.0.14 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
 __ubsan_handle_shift_out_of_bounds+0x36d/0x400 lib/ubsan.c:494
 null_zone_no drivers/block/null_blk/zoned.c:21 [inline]
 null_process_zoned_cmd+0xf76/0xf80 drivers/block/null_blk/zoned.c:728
 null_handle_cmd drivers/block/null_blk/main.c:1455 [inline]
 null_queue_rq+0x8bc/0xe70 drivers/block/null_blk/main.c:1703
 __blk_mq_issue_directly block/blk-mq.c:2694 [inline]
 blk_mq_try_issue_directly+0x3f4/0x880 block/blk-mq.c:2754
 blk_mq_submit_bio+0x20c0/0x2a40 block/blk-mq.c:3208
 __submit_bio_noacct_mq block/blk-core.c:756 [inline]
 submit_bio_noacct_nocheck+0x2f4/0xa40 block/blk-core.c:790
 bh_submit fs/buffer.c:1239 [inline]
 block_read_full_folio+0x7a6/0x810 fs/buffer.c:2463
 filemap_read_folio+0x12c/0x3a0 mm/filemap.c:2510
 do_read_cache_folio+0x354/0x590 mm/filemap.c:4140
 read_mapping_folio include/linux/pagemap.h:1015 [inline]
 read_part_sector+0xb6/0x2b0 block/partitions/core.c:724
 adfspart_check_ICS+0xb1/0x960 block/partitions/acorn.c:357
 check_partition block/partitions/core.c:143 [inline]
 blk_add_partitions block/partitions/core.c:591 [inline]
 bdev_disk_changed+0x851/0x17a0 block/partitions/core.c:695
 blkdev_get_whole+0x372/0x510 block/bdev.c:751
 bdev_open+0x324/0xd70 block/bdev.c:960
 bdev_file_open_by_dev+0x1be/0x240 block/bdev.c:1062
 disk_scan_partitions+0x1bb/0x2c0 block/genhd.c:387
 add_disk_final block/genhd.c:412 [inline]
 add_disk_fwnode+0x24b/0x3a0 block/genhd.c:606
 add_disk include/linux/blkdev.h:800 [inline]
 null_add_dev+0x130b/0x1d70 drivers/block/null_blk/main.c:2052
 nullb_device_power_store+0x240/0x380 drivers/block/null_blk/main.c:501
 flush_write_buffer fs/configfs/file.c:207 [inline]
 configfs_write_iter+0x337/0x430 fs/configfs/file.c:229
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f444919e0d9
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:00007f444a0ae028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f4449425fa0 RCX: 00007f444919e0d9
RDX: 0000000000000002 RSI: 0000200000000700 RDI: 0000000000000004
RBP: 00007f4449235024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4449426038 R14: 00007f4449425fa0 R15: 00007ffc895cc1c8
 </TASK>
---[ end trace ]---

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/05 10:08 upstream c21bb4193868 b3eac40e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in null_process_zoned_cmd
2026/08/05 08:02 upstream c21bb4193868 52aa2820 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: shift-out-of-bounds in null_process_zoned_cmd
2026/08/05 20:59 upstream c21bb4193868 1eed00d1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root UBSAN: shift-out-of-bounds in null_process_zoned_cmd
2026/08/05 11:09 linux-next cc2b5f627e8c b3eac40e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce UBSAN: shift-out-of-bounds in null_process_zoned_cmd
2026/08/04 19:49 linux-next cc2b5f627e8c d4abbeac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce UBSAN: shift-out-of-bounds in null_process_zoned_cmd
2026/08/05 08:14 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7235a3e71949 b3eac40e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 UBSAN: shift-out-of-bounds in null_process_zoned_cmd
2026/08/04 13:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7235a3e71949 d4abbeac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 UBSAN: shift-out-of-bounds in null_process_zoned_cmd
* Struck through repros no longer work on HEAD.