In the Linux kernel, the following vulnerability has been resolved:
block: Fix handling of offline queues in blkmqallocrequesthctx()
This patch prevents that test nvme/004 triggers the following:
UBSAN: array-index-out-of-bounds in block/blk-mq.h:135:9 index 512 is out of range for type 'long unsigned int [512]' Call Trace: showstack+0x52/0x58 dumpstacklvl+0x49/0x5e dumpstack+0x10/0x12 ubsanepilogue+0x9/0x3b _ubsanhandleoutofbounds.cold+0x44/0x49 blkmqallocrequesthctx+0x304/0x310 _nvmesubmitsynccmd+0x70/0x200 [nvmecore] nvmfconnectioqueue+0x23e/0x2a0 [nvmefabrics] nvmeloopconnectioqueues+0x8d/0xb0 [nvmeloop] nvmeloopcreatectrl+0x58e/0x7d0 [nvmeloop] nvmfcreatectrl+0x1d7/0x4d0 [nvmefabrics] nvmfdevwrite+0xae/0x111 [nvmefabrics] vfswrite+0x144/0x560 ksyswrite+0xb7/0x140 _x64syswrite+0x42/0x50 dosyscall64+0x35/0x80 entrySYSCALL64after_hwframe+0x44/0xae