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 linuxUpgrade linux-6.1 | May 15, 2025 | Apr 16, 2025 |
| Huawei Euleros 2_0_sp11 | — | Upgrade kernel-abi-stablelistsUpgrade python3-perfUpgrade kernelUpgrade kernel-tools-libsUpgrade kernel-toolsUpgrade bpftool | Mar 17, 2026 | Mar 17, 2026 |
| Huawei Euleros 2_0_sp12 | — | Upgrade kernel-tools-libsUpgrade python3-perfUpgrade bpftoolUpgrade kernel-abi-stablelistsUpgrade kernel-toolsUpgrade kernel | Jan 15, 2026 | Jan 13, 2026 |
| Suse | — | Upgrade reiserfs-kmp-defaultUpgrade kernel-devel-rtUpgrade kernel-rt-extraUpgrade kernel-syms-rtUpgrade dlm-kmp-azureUpgrade kernel-rt_debug-vdsoUpgrade kernel-default-base-rebuildUpgrade dtb-xilinxUpgrade kernel-default-livepatch-develUpgrade kernel-default-extraUpgrade kselftests-kmp-rtUpgrade reiserfs-kmp-azureUpgrade dtb-amlogicUpgrade dtb-rockchipUpgrade dtb-sprdUpgrade dtb-apmUpgrade reiserfs-kmp-rtUpgrade kernel-rt_debugUpgrade cluster-md-kmp-64kbUpgrade dtb-amdUpgrade kernel-docsUpgrade dlm-kmp-defaultUpgrade dtb-mediatekUpgrade dlm-kmp-rtUpgrade kernel-obs-buildUpgrade dtb-armUpgrade kernel-obs-qaUpgrade kselftests-kmp-defaultUpgrade kernel-rt-livepatch-develUpgrade cluster-md-kmp-defaultUpgrade kernel-azure-vdsoUpgrade kernel-defaultUpgrade dtb-nvidiaUpgrade kernel-default-baseUpgrade kernel-macrosUpgrade kernel-64kb-extraUpgrade dtb-renesasUpgrade dtb-socionextUpgrade kernel-rt-develUpgrade kernel-64kb-develUpgrade ocfs2-kmp-azureUpgrade kernel-azure-optionalUpgrade dtb-freescaleUpgrade dlm-kmp-64kbUpgrade reiserfs-kmp-64kbUpgrade kernel-default-livepatchUpgrade ocfs2-kmp-rtUpgrade ocfs2-kmp-64kbUpgrade kernel-rt-vdsoUpgrade gfs2-kmp-defaultUpgrade kernel-rtUpgrade kernel-debug-vdsoUpgrade dtb-amazonUpgrade dtb-caviumUpgrade dtb-allwinnerUpgrade kselftests-kmp-64kbUpgrade gfs2-kmp-azureUpgrade kernel-64kb-optionalUpgrade dtb-hisiliconUpgrade cluster-md-kmp-rtUpgrade kernel-kvmsmall-vdsoUpgrade kernel-azure-extraUpgrade kernel-source-azureUpgrade dtb-appleUpgrade kernel-azureUpgrade dtb-lgUpgrade ocfs2-kmp-defaultUpgrade kselftests-kmp-azureUpgrade kernel-source-rtUpgrade kernel-64kbUpgrade gfs2-kmp-rtUpgrade gfs2-kmp-64kbUpgrade kernel-sourceUpgrade kernel-rt_debug-develUpgrade kernel-devel-azureUpgrade kernel-develUpgrade kernel-azure-develUpgrade kernel-debugUpgrade kernel-kvmsmall-develUpgrade kernel-kvmsmallUpgrade kernel-default-develUpgrade dtb-qcomUpgrade kernel-rt-optionalUpgrade kernel-docs-htmlUpgrade kernel-zfcpdumpUpgrade kernel-default-optionalUpgrade kernel-default-vdsoUpgrade dtb-marvellUpgrade dtb-broadcomUpgrade cluster-md-kmp-azureUpgrade kernel-source-vanillaUpgrade kernel-syms-azureUpgrade kernel-debug-develUpgrade dtb-exynosUpgrade dtb-alteraUpgrade kernel-syms | Dec 5, 2025 | Jul 8, 2025 |
| Ubuntu | — | Upgrade linux-image-gkeUpgrade linux-image-gkeopUpgrade linux-image-azure-6.11Upgrade linux-image-lowlatency-hwe-24.04Upgrade linux-image-nvidia-64kUpgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-6.11.0-28-genericUpgrade linux-image-oem-22.04aUpgrade linux-image-gkeop-6.8Upgrade linux-image-azure-fde-edgeUpgrade linux-image-generic-64kUpgrade linux-image-6.11.0-1024-oemUpgrade linux-image-6.14.0-22-generic-64kUpgrade linux-image-aws-64kUpgrade linux-image-azure-fips-6.8Upgrade linux-image-azure-6.8Upgrade linux-image-oracle-64kUpgrade linux-image-6.11.0-1018-azureUpgrade linux-image-6.14.0-1008-gcp-64kUpgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-generic-lpaeUpgrade linux-image-gke-6.8Upgrade linux-image-realtime-6.8.1Upgrade linux-image-raspi-realtime-6.8Upgrade linux-image-gcpUpgrade linux-image-6.14.0-1007-azure-fdeUpgrade linux-image-raspi-6.8Upgrade linux-image-6.11.0-1018-azure-fdeUpgrade linux-image-raspi-realtimeUpgrade linux-image-azure-nvidia-6.8Upgrade linux-image-ibmUpgrade linux-image-6.8.0-1041-raspiUpgrade linux-image-6.8.0-1041-nvidia-lowlatencyUpgrade linux-image-6.11.0-1015-awsUpgrade linux-image-gcp-64kUpgrade linux-image-lowlatency-64kUpgrade linux-image-virtual-hwe-22.04Upgrade linux-image-nvidia-6.8Upgrade linux-image-6.14.0-1008-gcpUpgrade linux-image-genericUpgrade linux-image-6.14.0-1007-aws-64kUpgrade linux-image-6.8.0-1041-nvidia-lowlatency-64kUpgrade linux-image-realtime-hwe-22.04Upgrade linux-image-azure-lts-24.04Upgrade linux-image-raspiUpgrade linux-image-virtual-6.8Upgrade linux-image-6.8.0-1041-azureUpgrade linux-image-6.11.0-1016-gcpUpgrade linux-image-oem-22.04Upgrade linux-image-nvidia-lowlatency-6.8Upgrade linux-image-azure-nvidia-lts-24.04Upgrade linux-image-6.11.0-1016-gcp-64kUpgrade linux-image-6.8.1-1036-realtimeUpgrade linux-image-6.11.0-1011-realtimeUpgrade linux-image-oem-22.04cUpgrade linux-image-6.8.0-1041-aws-64kUpgrade linux-image-6.8.0-1041-awsUpgrade linux-image-6.8.0-86-lowlatencyUpgrade linux-image-aws-6.8Upgrade linux-image-oracle-lts-24.04Upgrade linux-image-6.8.0-1044-azure-fipsUpgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-virtual-hwe-24.04Upgrade linux-image-6.8.0-2032-raspi-realtimeUpgrade linux-image-ibm-classicUpgrade linux-image-azureUpgrade linux-image-6.8.0-1029-azure-nvidiaUpgrade linux-image-lowlatencyUpgrade linux-image-oracle-64k-6.8Upgrade linux-image-6.8.0-1038-gkeUpgrade linux-image-nvidiaUpgrade linux-image-gke-64k-6.8Upgrade linux-image-aws-64k-lts-24.04Upgrade linux-image-6.14.0-22-genericUpgrade linux-image-6.8.0-86-lowlatency-64kUpgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-6.8.0-1038-oracleUpgrade linux-image-generic-hwe-24.04Upgrade linux-image-awsUpgrade linux-image-kvmUpgrade linux-image-lowlatency-64k-6.8Upgrade linux-image-6.8.0-1038-gke-64kUpgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-oem-24.04bUpgrade linux-image-lowlatency-64k-hwe-24.04Upgrade linux-image-6.14.0-1007-raspiUpgrade linux-image-lowlatency-6.11Upgrade linux-image-oem-22.04bUpgrade linux-image-oracle-6.8Upgrade linux-image-aws-64k-6.8Upgrade linux-image-ibm-6.8Upgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-6.8.0-1025-gkeopUpgrade linux-image-azure-fde-6.11Upgrade linux-image-6.11.0-28-generic-64kUpgrade linux-image-virtualUpgrade linux-image-realtimeUpgrade linux-image-6.8.0-1041-nvidiaUpgrade linux-image-6.8.0-1042-gcpUpgrade linux-image-6.8.0-86-genericUpgrade linux-image-6.8.0-86-generic-64kUpgrade linux-image-6.11.0-1017-oracle-64kUpgrade linux-image-6.11.0-1015-lowlatency-64kUpgrade linux-image-6.11.0-1015-lowlatencyUpgrade linux-image-generic-64k-6.8Upgrade linux-image-nvidia-64k-6.8Upgrade linux-image-lowlatency-64k-6.11Upgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-ibm-lts-24.04Upgrade linux-image-aws-lts-24.04Upgrade linux-image-6.14.0-1007-azureUpgrade linux-image-oracleUpgrade linux-image-6.8.0-1039-ibmUpgrade linux-image-gke-64kUpgrade linux-image-generic-6.8Upgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-6.8.0-1042-gcp-64kUpgrade linux-image-nvidia-lowlatencyUpgrade linux-image-generic-hwe-22.04Upgrade linux-image-gcp-6.8Upgrade linux-image-6.8.0-1038-oracle-64kUpgrade linux-image-oem-22.04dUpgrade linux-image-6.8.0-1041-nvidia-64kUpgrade linux-image-azure-fdeUpgrade linux-image-6.14.0-1007-awsUpgrade linux-image-6.11.0-1014-raspiUpgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-gcp-64k-6.8Upgrade linux-image-6.14.0-1007-oracleUpgrade linux-image-azure-fipsUpgrade linux-image-lowlatency-6.8Upgrade linux-image-6.11.0-1017-oracleUpgrade linux-image-nvidia-lowlatency-64k-6.8Upgrade linux-image-6.14.0-1007-oracle-64kUpgrade linux-image-gcp-lts-24.04Upgrade linux-image-6.14.0-1004-realtime | 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