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
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Operational
Clear the vhost-scsi endpoint before changing any negotiated feature other than VHOST_F_LOG_ALL, then set the endpoint up again afterward; VHOST_F_LOG_ALL remains the only feature that may change while the endpoint is active.
Event History
Frequently Asked Questions
What sequence is required to trigger the failure?
A vhost-scsi endpoint must already be active, then VHOST_SET_FEATURES must enable the acknowledged VIRTIO_SCSI_F_T10_PI feature bit. Subsequent I/O with a 129-page protection payload can reach the invalid scatterlist allocation path.
Who can cause the problematic state?
The condition requires an entity able to issue VHOST_SET_FEATURES after endpoint setup and enable VIRTIO_SCSI_F_T10_PI. The affected I/O path is reached only after that post-setup feature change.
What can be done before applying the fix?
Do not change the T10-PI feature bit after configuring a vhost-scsi endpoint. Complete feature negotiation before endpoint setup and avoid enabling T10-PI on an already active endpoint.
How can operators recognize that this issue has occurred?
The kernel can hit BUG_ON(nents > SG_CHUNK_SIZE) when allocating a chained scatterlist, with 129 entries exceeding the 128-entry chunk size. The reported call trace includes sg_alloc_table_chained(), sg_pool_index(), and the vhost-scsi I/O mapping path.