CVE-2026-74702: vhost-scsi: reject feature changes after endpoint
In the Linux kernel, the following vulnerability has been resolved:
vhost-scsi: reject feature changes after endpoint
vhostscsisetupvqcmds() runs from VHOSTSCSISETENDPOINT and allocates each command's protection scatterlist array (protsgl) according to the acknowledged VIRTIOSCSIFT10PI bit. The command pools are not rebuilt when VHOSTSETFEATURES changes that bit later.
Although virtio feature bits must not change after feature negotiation, vhostscsisetfeatures() currently accepts such a request after the endpoint is active and updates ackedfeatures. Enabling T10-PI after endpoint setup therefore leaves protsgl NULL while the I/O path follows the new feature bit.
For a 129-page protection payload, vhostscsimapal() passes the missing first chunk to sgalloctablechained():
sgalloctablechained(table, 129, firstchunk=NULL, nentsfirstchunk=inlinesgcnt)
sgpoolindex() then hits:
BUGON(nents > SGCHUNKSIZE); / 129 > 128 /
The kernel reported the following call trace and register state:
Call Trace: <TASK> ? sgalloctable+0x1d8/0x250 ? pfxvhostrunworklist+0x10/0x10 [vhost] sgalloctablechained+0x59/0xf0 ? pfxsgpoolalloc+0x10/0x10 ? vhostscsicalcsgls.constprop.0+0x43/0x60 [vhostscsi] vhostscsihandlevq+0xf02/0x1700 [vhostscsi] ? pfxvhostscsihandlevq+0x10/0x10 [vhostscsi] vhostscsihandlekick+0x37/0x50 [vhostscsi] vhostrunworklist+0x8e/0xd0 [vhost] vhosttaskfn+0xe1/0x210 retfromfork+0x348/0x540 </TASK>
RIP: 0010:0x4 CR2 = 0x4 RSP: 0018:ffffc90000dbf940 EFLAGS: 00010202 RAX: ffffffff82396810 RBX: ffff88811dc28b80 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000820 RDI: 0000000000000081
VHOSTFLOGALL is a vhost-specific runtime feature and remains the only exception.
Reject changes to any feature other than VHOSTFLOGALL while the endpoint is active. This preserves the existing runtime log toggle while preventing feature-dependent command resources and data-path state from becoming inconsistent. Userspace must clear the endpoint before changing any other negotiated feature and set the endpoint up again afterward.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Linux kernel vhost-scsito a version that resolves this vulnerability.Patch vhost-scsi: reject feature changes after endpoint