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