In the Linux kernel, the following vulnerability has been resolved:
vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
If vhost_scsi_set_endpoint is called multiple times without a vhost_scsi_clear_endpoint between them, we can hit multiple bugs found by Haoran Zhang:
1. Use-after-free when no tpgs are found:
This fixes a use after free that occurs when vhost_scsi_set_endpoint is called more than once and calls after the first call do not find any tpgs to add to the vs_tpg. When vhost_scsi_set_endpoint first finds tpgs to add to the vs_tpg array match=true, so we will do:
vhost_vq_set_backend(vq, vs_tpg); ...
kfree(vs->vs_tpg); vs->vs_tpg = vs_tpg;
If vhost_scsi_set_endpoint is called again and no tpgs are found match=false so we skip the vhost_vq_set_backend call leaving the pointer to the vs_tpg we then free via:
kfree(vs->vs_tpg); vs->vs_tpg = vs_tpg;
If a scsi request is then sent we do:
vhost_scsi_handle_vq -> vhost_scsi_get_req -> vhost_vq_get_backend
which sees the vs_tpg we just did a kfree on.
2. Tpg dir removal hang:
This patch fixes an issue where we cannot remove a LIO/target layer tpg (and structs above it like the target) dir due to the refcount dropping to -1.
The problem is that if vhost_scsi_set_endpoint detects a tpg is already in the vs->vs_tpg array or if the tpg has been removed so target_depend_item fails, the undepend goto handler will do target_undepend_item on all tpgs in the vs_tpg array dropping their refcount to 0. At this time vs_tpg contains both the tpgs we have added in the current vhost_scsi_set_endpoint call as well as tpgs we added in previous calls which are also in vs->vs_tpg.
Later, when vhost_scsi_clear_endpoint runs it will do target_undepend_item on all the tpgs in the vs->vs_tpg which will drop their refcount to -1. Userspace will then not be able to remove the tpg and will hang when it tries to do rmdir on the tpg dir.
3. Tpg leak:
This fixes a bug where we can leak tpgs and cause them to be un-removable because the target name is overwritten when vhost_scsi_set_endpoint is called multiple times but with different target names.
The bug occurs if a user has called VHOST_SCSI_SET_ENDPOINT and setup a vhost-scsi device to target/tpg mapping, then calls VHOST_SCSI_SET_ENDPOINT again with a new target name that has tpgs we haven't seen before (target1 has tpg1 but target2 has tpg2). When this happens we don't teardown the old target tpg mapping and just overwrite the target name and the vs->vs_tpg array. Later when we do vhost_scsi_clear_endpoint, we are passed in either target1 or target2's name and we will only match that target's tpgs when we loop over the vs->vs_tpg. We will then return from the function without doing target_undepend_item on the tpgs.
Because of all these bugs, it looks like being able to call vhost_scsi_set_endpoint multiple times was never supported. The major user, QEMU, already has checks to prevent this use case. So to fix the issues, this patch prevents vhost_scsi_set_endpoint from being called if it's already successfully added tpgs. To add, remove or change the tpg config or target name, you must do a vhost_scsi_clear_endpoint first.
CVSS Details
- CVSS 3.1 Base Score: 7.8
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Debian | — | Upgrade linux-6.1Upgrade linux | May 15, 2025 | Apr 16, 2025 |
| Huawei Euleros 2_0_sp11 | — | Upgrade bpftoolUpgrade kernel-toolsUpgrade kernel-tools-libsUpgrade python3-perfUpgrade kernel-abi-stablelistsUpgrade kernel | Mar 17, 2026 | Mar 17, 2026 |
| Huawei Euleros 2_0_sp12 | — | Upgrade kernel-tools-libsUpgrade bpftoolUpgrade python3-perfUpgrade kernel-toolsUpgrade kernelUpgrade kernel-abi-stablelists | Jan 15, 2026 | Jan 13, 2026 |
| Suse | — | Upgrade kernel-azure-vdsoUpgrade kernel-devel-rtUpgrade kernel-rt-livepatch-develUpgrade kernel-64kb-extraUpgrade kernel-defaultUpgrade kernel-default-extraUpgrade kernel-obs-qaUpgrade kernel-rt_debug-vdsoUpgrade kernel-rt_debugUpgrade reiserfs-kmp-azureUpgrade reiserfs-kmp-defaultUpgrade kernel-default-livepatch-develUpgrade dtb-armUpgrade dtb-renesasUpgrade dlm-kmp-defaultUpgrade dtb-xilinxUpgrade dtb-apmUpgrade kselftests-kmp-defaultUpgrade dtb-nvidiaUpgrade kernel-default-base-rebuildUpgrade dtb-sprdUpgrade dtb-rockchipUpgrade dtb-amlogicUpgrade kernel-64kb-develUpgrade kernel-macrosUpgrade kernel-rt-develUpgrade kernel-default-baseUpgrade cluster-md-kmp-64kbUpgrade cluster-md-kmp-defaultUpgrade dtb-amdUpgrade dtb-mediatekUpgrade kselftests-kmp-rtUpgrade kernel-docsUpgrade dlm-kmp-rtUpgrade kernel-obs-buildUpgrade dtb-socionextUpgrade kernel-rt-extraUpgrade kernel-syms-rtUpgrade dlm-kmp-azureUpgrade reiserfs-kmp-rtUpgrade dtb-amazonUpgrade gfs2-kmp-64kbUpgrade dtb-lgUpgrade kselftests-kmp-azureUpgrade kernel-source-rtUpgrade kernel-sourceUpgrade kernel-rt_debug-develUpgrade kernel-devel-azureUpgrade kernel-syms-azureUpgrade kernel-symsUpgrade kernel-source-vanillaUpgrade dtb-exynosUpgrade kernel-debug-develUpgrade dtb-alteraUpgrade kernel-kvmsmall-develUpgrade kernel-default-develUpgrade gfs2-kmp-defaultUpgrade kernel-kvmsmallUpgrade ocfs2-kmp-azureUpgrade ocfs2-kmp-64kbUpgrade kernel-default-livepatchUpgrade ocfs2-kmp-rtUpgrade kernel-rt-vdsoUpgrade reiserfs-kmp-64kbUpgrade kernel-kvmsmall-vdsoUpgrade kernel-azure-extraUpgrade kernel-64kb-optionalUpgrade dtb-hisiliconUpgrade kernel-source-azureUpgrade gfs2-kmp-azureUpgrade dtb-caviumUpgrade dtb-allwinnerUpgrade kselftests-kmp-64kbUpgrade cluster-md-kmp-rtUpgrade kernel-rtUpgrade kernel-debug-vdsoUpgrade kernel-azure-optionalUpgrade dtb-freescaleUpgrade dlm-kmp-64kbUpgrade kernel-docs-htmlUpgrade kernel-rt-optionalUpgrade kernel-default-optionalUpgrade kernel-default-vdsoUpgrade dtb-qcomUpgrade dtb-marvellUpgrade cluster-md-kmp-azureUpgrade dtb-broadcomUpgrade kernel-zfcpdumpUpgrade kernel-debugUpgrade dtb-appleUpgrade ocfs2-kmp-defaultUpgrade kernel-develUpgrade kernel-azure-develUpgrade kernel-azureUpgrade kernel-64kbUpgrade gfs2-kmp-rt | Dec 5, 2025 | Jul 8, 2025 |
| Ubuntu | — | Upgrade linux-image-6.8.0-1038-oracleUpgrade linux-image-oem-22.04dUpgrade linux-image-azure-fipsUpgrade linux-image-6.14.0-1007-awsUpgrade linux-image-6.11.0-1014-raspiUpgrade linux-image-azure-fdeUpgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-gcp-64k-6.8Upgrade linux-image-6.8.0-1041-nvidia-64kUpgrade linux-image-ibm-lts-24.04Upgrade linux-image-6.14.0-22-genericUpgrade linux-image-6.11.0-1015-lowlatency-64kUpgrade linux-image-awsUpgrade linux-image-6.11.0-1017-oracle-64kUpgrade linux-image-6.8.0-1039-ibmUpgrade linux-image-nvidia-64k-6.8Upgrade linux-image-6.11.0-1015-lowlatencyUpgrade linux-image-6.14.0-1007-azureUpgrade linux-image-kvmUpgrade linux-image-lowlatency-64k-6.11Upgrade linux-image-oracleUpgrade linux-image-lowlatency-64k-6.8Upgrade linux-image-generic-6.8Upgrade linux-image-gke-64kUpgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-6.8.0-86-generic-64kUpgrade linux-image-aws-lts-24.04Upgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-generic-64k-6.8Upgrade linux-image-6.8.0-1038-gke-64kUpgrade linux-image-6.8.0-1041-nvidiaUpgrade linux-image-azure-fde-6.11Upgrade linux-image-oem-22.04bUpgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-lowlatency-6.11Upgrade linux-image-oracle-6.8Upgrade linux-image-6.11.0-28-generic-64kUpgrade linux-image-ibm-6.8Upgrade linux-image-6.14.0-1007-raspiUpgrade linux-image-6.8.0-1025-gkeopUpgrade linux-image-aws-64k-6.8Upgrade linux-image-6.8.0-86-genericUpgrade linux-image-gcp-lts-24.04Upgrade linux-image-virtualUpgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-realtimeUpgrade linux-image-6.8.0-1042-gcpUpgrade linux-image-lowlatency-64k-hwe-24.04Upgrade linux-image-nvidia-lowlatency-64k-6.8Upgrade linux-image-lowlatency-6.8Upgrade linux-image-generic-hwe-24.04Upgrade linux-image-6.14.0-1007-oracleUpgrade linux-image-6.14.0-1007-oracle-64kUpgrade linux-image-aws-64k-lts-24.04Upgrade linux-image-oem-24.04bUpgrade linux-image-nvidia-lowlatencyUpgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-generic-hwe-22.04Upgrade linux-image-6.8.0-1042-gcp-64kUpgrade linux-image-6.14.0-1004-realtimeUpgrade linux-image-gcp-6.8Upgrade linux-image-6.11.0-1017-oracleUpgrade linux-image-6.8.0-1038-oracle-64kUpgrade linux-image-6.8.0-86-lowlatency-64kUpgrade linux-image-gcpUpgrade linux-image-gkeopUpgrade linux-image-oem-22.04aUpgrade linux-image-realtime-6.8.1Upgrade linux-image-aws-64kUpgrade linux-image-6.8.0-1041-raspiUpgrade linux-image-azure-6.11Upgrade linux-image-6.8.0-1041-nvidia-lowlatencyUpgrade linux-image-6.11.0-28-genericUpgrade linux-image-6.14.0-1008-gcpUpgrade linux-image-6.8.0-1041-azureUpgrade linux-image-nvidia-6.8Upgrade linux-image-6.14.0-1007-aws-64kUpgrade linux-image-6.11.0-1016-gcp-64kUpgrade linux-image-6.8.0-1041-nvidia-lowlatency-64kUpgrade linux-image-realtime-hwe-22.04Upgrade linux-image-6.8.1-1036-realtimeUpgrade linux-image-raspiUpgrade linux-image-6.11.0-1018-azure-fdeUpgrade linux-image-6.14.0-1007-azure-fdeUpgrade linux-image-raspi-realtimeUpgrade linux-image-virtual-hwe-22.04Upgrade linux-image-6.11.0-1024-oemUpgrade linux-image-lowlatency-64kUpgrade linux-image-oracle-lts-24.04Upgrade linux-image-aws-6.8Upgrade linux-image-gcp-64kUpgrade linux-image-6.8.0-86-lowlatencyUpgrade linux-image-6.11.0-1011-realtimeUpgrade linux-image-gke-6.8Upgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-azure-6.8Upgrade linux-image-6.8.0-1044-azure-fipsUpgrade linux-image-generic-lpaeUpgrade linux-image-virtual-hwe-24.04Upgrade linux-image-raspi-6.8Upgrade linux-image-ibm-classicUpgrade linux-image-azure-nvidia-lts-24.04Upgrade linux-image-6.14.0-22-generic-64kUpgrade linux-image-6.14.0-1008-gcp-64kUpgrade linux-image-6.11.0-1018-azureUpgrade linux-image-nvidiaUpgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-nvidia-lowlatency-6.8Upgrade linux-image-6.11.0-1016-gcpUpgrade linux-image-virtual-6.8Upgrade linux-image-lowlatencyUpgrade linux-image-azure-lts-24.04Upgrade linux-image-azureUpgrade linux-image-6.8.0-1038-gkeUpgrade linux-image-6.8.0-1029-azure-nvidiaUpgrade linux-image-oem-22.04Upgrade linux-image-oracle-64k-6.8Upgrade linux-image-genericUpgrade linux-image-oracle-64kUpgrade linux-image-gkeop-6.8Upgrade linux-image-generic-64kUpgrade linux-image-azure-fde-edgeUpgrade linux-image-azure-nvidia-6.8Upgrade linux-image-nvidia-64kUpgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-azure-fips-6.8Upgrade linux-image-6.8.0-1041-aws-64kUpgrade linux-image-oem-22.04cUpgrade linux-image-6.8.0-1041-awsUpgrade linux-image-gke-64k-6.8Upgrade linux-image-6.8.0-2032-raspi-realtimeUpgrade linux-image-6.11.0-1015-awsUpgrade linux-image-lowlatency-hwe-24.04Upgrade linux-image-gkeUpgrade linux-image-raspi-realtime-6.8Upgrade linux-image-ibm | Jun 26, 2025 | Apr 16, 2025 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jul 28, 2026 | Apr 16, 2025 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub