Vulnerability · Published May 1, 2024 · Assigned by Linux

CVE-2024-26935scsi: core: Fix unremoved procfs host directory regression

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 15% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 84.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: scsi: core: Fix unremoved procfs host directory regression Commit fc663711b944 ("scsi: core: Remove the /proc/scsi/${proc_name} directory earlier") fixed a bug related to modules loading/unloading, by adding a call to scsi_proc_hostdir_rm() on scsi_remove_host(). But that led to a potential duplicate call to the hostdir_rm() routine, since it's also called from scsi_host_dev_release(). That triggered a regression report, which was then fixed by commit be03df3d4bfe ("scsi: core: Fix a procfs host directory removal regression"). The fix just dropped the hostdir_rm() call from dev_release(). But it happens that this proc directory is created on scsi_host_alloc(), and that function "pairs" with scsi_host_dev_release(), while scsi_remove_host() pairs with scsi_add_host(). In other words, it seems the reason for removing the proc directory on dev_release() was meant to cover cases in which a SCSI host structure was allocated, but the call to scsi_add_host() didn't happen. And that pattern happens to exist in some error paths, for example. Syzkaller causes that by using USB raw gadget device, error'ing on usb-storage driver, at usb_stor_probe2(). By checking that path, we can see that the BadDevice label leads to a scsi_host_put() after a SCSI host allocation, but there's no call to scsi_add_host() in such path. That leads to messages like this in dmesg (and a leak of the SCSI host proc structure): usb-storage 4-1:87.51: USB Mass Storage device detected proc_dir_entry 'scsi/usb-storage' already registered WARNING: CPU: 1 PID: 3519 at fs/proc/generic.c:377 proc_register+0x347/0x4e0 fs/proc/generic.c:376 The proper fix seems to still call scsi_proc_hostdir_rm() on dev_release(), but guard that with the state check for SHOST_CREATED; there is even a comment in scsi_host_dev_release() detailing that: such conditional is meant for cases where the SCSI host was allocated but there was no calls to {add,remove}_host(), like the usb-storage case. This is what we propose here and with that, the error path of usb-storage does not trigger the warning anymore.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8bpftool4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9bpftool7.3.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-debug5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-debug-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-debug-devel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-debug-devel-matched5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-debug-modules5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-debug-modules-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-debug-modules-extra5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-devel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-devel-matched5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-modules5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-modules-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-64k-modules-extra5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-abi-stablelists4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-abi-stablelists5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-core4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-cross-headers4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-cross-headers5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-debug4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-debug5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-debug-core4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-debug-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-debug-devel4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-debug-devel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-debug-devel-matched5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-debug-modules4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-debug-modules5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-debug-modules-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-debug-modules-extra4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-debug-modules-extra5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-debug-uki-virt5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-devel4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-devel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-devel-matched5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-doc4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-doc5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-headers4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-headers5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-modules4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-modules5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-modules-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-modules-extra4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-modules-extra5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-core4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-debug4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-debug5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-debug-core4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-debug-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-debug-devel4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-debug-devel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-debug-modules4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-debug-modules5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-rt-debug-modules-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-debug-modules-extra4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-debug-modules-extra5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-devel4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-devel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-modules4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-modules5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-rt-modules-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-rt-modules-extra4.18.0-553.37.1.rt7.378.el8_10ALSA-2025:1067
AlmaLinux:9kernel-rt-modules-extra5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-tools4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-tools5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-tools-libs4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-tools-libs5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-tools-libs-devel4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-tools-libs-devel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-uki-virt5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-zfcpdump4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-zfcpdump5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-zfcpdump-core4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-zfcpdump-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-zfcpdump-devel4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-zfcpdump-devel5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-zfcpdump-devel-matched5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-zfcpdump-modules4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-zfcpdump-modules5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9kernel-zfcpdump-modules-core5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8kernel-zfcpdump-modules-extra4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9kernel-zfcpdump-modules-extra5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9libperf5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8perf4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9perf5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:8python3-perf4.18.0-553.37.1.el8_10ALSA-2025:1068
AlmaLinux:9python3-perf5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9rtla5.14.0-427.42.1.el9_4ALSA-2024:8617
AlmaLinux:9rv5.14.0-427.42.1.el9_4ALSA-2024:8617
Debian:12linux6.1.85-1DEBIAN-CVE-2024-26935
Debian:13linux6.7.12-1DEBIAN-CVE-2024-26935
Debian:14linux6.7.12-1DEBIAN-CVE-2024-26935
Rocky Linux:8kernel0:4.18.0-553.37.1.el8_10RLSA-2025:1068
Rocky Linux:9kernel0:5.14.0-427.42.1.el9_4RLSA-2024:8617
Rocky Linux:8kernel-rt0:4.18.0-553.37.1.rt7.378.el8_10RLSA-2025:1067
Ubuntu:22.04:LTSlinux5.15.0-116.126UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux5.15.0-116.126USN-6898-1
Ubuntu:24.04:LTSlinux6.8.0-35.35UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-aws5.15.0-1065.71UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-aws5.15.0-1065.71USN-6898-3
Ubuntu:24.04:LTSlinux-aws6.8.0-1009.9UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-azure5.15.0-1068.77USN-6917-1
Ubuntu:22.04:LTSlinux-azure5.15.0-1068.77UBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-azure6.8.0-1008.8UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1068.77.1USN-6917-1
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1068.77.1UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-gcp5.15.0-1064.72USN-6898-1
Ubuntu:22.04:LTSlinux-gcp5.15.0-1064.72UBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-gcp6.8.0-1008.9UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-gke5.15.0-1062.68USN-6898-1
Ubuntu:22.04:LTSlinux-gke5.15.0-1062.68UBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-gke6.8.0-1004.7UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1048.55UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1048.55USN-6898-1
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-ibm5.15.0-1058.61USN-6898-1
Ubuntu:22.04:LTSlinux-ibm5.15.0-1058.61UBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-ibm6.8.0-1006.6UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1060.66UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1060.66USN-6898-1
Ubuntu:22.04:LTSlinux-kvm5.15.0-1062.67USN-6898-1
Ubuntu:22.04:LTSlinux-kvm5.15.0-1062.67UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-116.126USN-6898-2
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-116.126UBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-35.35.1UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1060.61USN-6898-1
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1060.61UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1026.26UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1015.15UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1006.6UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-oracle5.15.0-1063.69USN-6898-1
Ubuntu:22.04:LTSlinux-oracle5.15.0-1063.69UBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-oracle6.8.0-1006.6UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-raspi5.15.0-1058.61UBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-raspi6.8.0-1005.5UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-26935
Ubuntu:24.04:LTSlinux-riscv6.8.0-35.35.1UBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-26935
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1035.39USN-7019-1
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1035.39UBUNTU-CVE-2024-26935

Affected products (as reported)

VendorProductVersions
Linux Linux 88c3d3bb6469cea929ac68fd326bdcbefcdfdd83 – before 0053f15d50d50c9312d8ab9c11e2e405812dfcac68c665bb185037e7eb66fb792c61da9d7151e99c – before 5c2386ba80e779a92ec3bb64ccadbedd88f779b12a764d55e938743efa7c2cba7305633bcf227f09 – before cea234bb214b17d004dfdccce4491e6ff57c96ee7e0ae8667fcdd99d1756922e1140cac75f5fa279 – before 3678cf67ff7136db1dd3bf63c361650db5d92889be03df3d4bfe7e8866d4aa43d62e648ffe884f5f – before d4c34782b6d7b1e68d18d9549451b19433bd4c6cbe03df3d4bfe7e8866d4aa43d62e648ffe884f5f – before e293c773c13b830cdc251f155df2254981abc320be03df3d4bfe7e8866d4aa43d62e648ffe884f5f – before f4ff08fab66eb5c0b97e1a24edac052fb40bf5d7be03df3d4bfe7e8866d4aa43d62e648ffe884f5f – before f23a4d6e07570826fe95023ca1aa96a011fa9f84
Linux Linux 6.3

References