vulnerability

Ubuntu: (Multiple Advisories) (CVE-2024-26935): Linux kernel vulnerabilities

Severity
5
CVSS
(AV:L/AC:L/Au:S/C:N/I:N/A:C)
Published
05/01/2024
Added
07/01/2024
Modified
02/20/2025

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.

Solution(s)

ubuntu-upgrade-linux-image-5-15-0-1035-xilinx-zynqmpubuntu-upgrade-linux-image-5-15-0-1048-gkeopubuntu-upgrade-linux-image-5-15-0-1058-ibmubuntu-upgrade-linux-image-5-15-0-1058-raspiubuntu-upgrade-linux-image-5-15-0-1060-intel-iotgubuntu-upgrade-linux-image-5-15-0-1060-nvidiaubuntu-upgrade-linux-image-5-15-0-1060-nvidia-lowlatencyubuntu-upgrade-linux-image-5-15-0-1062-gkeubuntu-upgrade-linux-image-5-15-0-1062-kvmubuntu-upgrade-linux-image-5-15-0-1063-oracleubuntu-upgrade-linux-image-5-15-0-1064-gcpubuntu-upgrade-linux-image-5-15-0-1065-awsubuntu-upgrade-linux-image-5-15-0-1065-gcpubuntu-upgrade-linux-image-5-15-0-1068-azureubuntu-upgrade-linux-image-5-15-0-1068-azure-fdeubuntu-upgrade-linux-image-5-15-0-116-genericubuntu-upgrade-linux-image-5-15-0-116-generic-64kubuntu-upgrade-linux-image-5-15-0-116-generic-lpaeubuntu-upgrade-linux-image-5-15-0-116-lowlatencyubuntu-upgrade-linux-image-5-15-0-116-lowlatency-64kubuntu-upgrade-linux-image-5-4-0-1040-iotubuntu-upgrade-linux-image-5-4-0-1047-xilinx-zynqmpubuntu-upgrade-linux-image-5-4-0-1075-ibmubuntu-upgrade-linux-image-5-4-0-1088-bluefieldubuntu-upgrade-linux-image-5-4-0-1095-gkeopubuntu-upgrade-linux-image-5-4-0-1112-raspiubuntu-upgrade-linux-image-5-4-0-1116-kvmubuntu-upgrade-linux-image-5-4-0-1127-oracleubuntu-upgrade-linux-image-5-4-0-1128-awsubuntu-upgrade-linux-image-5-4-0-1132-gcpubuntu-upgrade-linux-image-5-4-0-1133-azureubuntu-upgrade-linux-image-5-4-0-189-genericubuntu-upgrade-linux-image-5-4-0-189-generic-lpaeubuntu-upgrade-linux-image-5-4-0-189-lowlatencyubuntu-upgrade-linux-image-6-8-0-1004-gkeubuntu-upgrade-linux-image-6-8-0-1005-raspiubuntu-upgrade-linux-image-6-8-0-1006-ibmubuntu-upgrade-linux-image-6-8-0-1006-oemubuntu-upgrade-linux-image-6-8-0-1006-oracleubuntu-upgrade-linux-image-6-8-0-1006-oracle-64kubuntu-upgrade-linux-image-6-8-0-1008-azureubuntu-upgrade-linux-image-6-8-0-1008-azure-fdeubuntu-upgrade-linux-image-6-8-0-1008-gcpubuntu-upgrade-linux-image-6-8-0-1009-awsubuntu-upgrade-linux-image-6-8-0-35-genericubuntu-upgrade-linux-image-6-8-0-35-generic-64kubuntu-upgrade-linux-image-6-8-0-35-lowlatencyubuntu-upgrade-linux-image-6-8-0-35-lowlatency-64kubuntu-upgrade-linux-image-awsubuntu-upgrade-linux-image-aws-lts-20-04ubuntu-upgrade-linux-image-aws-lts-22-04ubuntu-upgrade-linux-image-azureubuntu-upgrade-linux-image-azure-cvmubuntu-upgrade-linux-image-azure-fdeubuntu-upgrade-linux-image-azure-fde-lts-22-04ubuntu-upgrade-linux-image-azure-lts-20-04ubuntu-upgrade-linux-image-azure-lts-22-04ubuntu-upgrade-linux-image-bluefieldubuntu-upgrade-linux-image-gcpubuntu-upgrade-linux-image-gcp-lts-20-04ubuntu-upgrade-linux-image-gcp-lts-22-04ubuntu-upgrade-linux-image-genericubuntu-upgrade-linux-image-generic-64kubuntu-upgrade-linux-image-generic-64k-hwe-20-04ubuntu-upgrade-linux-image-generic-64k-hwe-24-04ubuntu-upgrade-linux-image-generic-hwe-18-04ubuntu-upgrade-linux-image-generic-hwe-20-04ubuntu-upgrade-linux-image-generic-hwe-24-04ubuntu-upgrade-linux-image-generic-lpaeubuntu-upgrade-linux-image-generic-lpae-hwe-20-04ubuntu-upgrade-linux-image-gkeubuntu-upgrade-linux-image-gke-5-15ubuntu-upgrade-linux-image-gkeopubuntu-upgrade-linux-image-gkeop-5-15ubuntu-upgrade-linux-image-gkeop-5-4ubuntu-upgrade-linux-image-ibmubuntu-upgrade-linux-image-ibm-classicubuntu-upgrade-linux-image-ibm-lts-20-04ubuntu-upgrade-linux-image-ibm-lts-24-04ubuntu-upgrade-linux-image-intelubuntu-upgrade-linux-image-intel-iotgubuntu-upgrade-linux-image-kvmubuntu-upgrade-linux-image-lowlatencyubuntu-upgrade-linux-image-lowlatency-64kubuntu-upgrade-linux-image-lowlatency-64k-hwe-20-04ubuntu-upgrade-linux-image-lowlatency-hwe-18-04ubuntu-upgrade-linux-image-lowlatency-hwe-20-04ubuntu-upgrade-linux-image-nvidiaubuntu-upgrade-linux-image-nvidia-lowlatencyubuntu-upgrade-linux-image-oemubuntu-upgrade-linux-image-oem-20-04ubuntu-upgrade-linux-image-oem-20-04bubuntu-upgrade-linux-image-oem-20-04cubuntu-upgrade-linux-image-oem-20-04dubuntu-upgrade-linux-image-oem-24-04ubuntu-upgrade-linux-image-oem-24-04aubuntu-upgrade-linux-image-oem-osp1ubuntu-upgrade-linux-image-oracleubuntu-upgrade-linux-image-oracle-64kubuntu-upgrade-linux-image-oracle-lts-20-04ubuntu-upgrade-linux-image-oracle-lts-22-04ubuntu-upgrade-linux-image-raspiubuntu-upgrade-linux-image-raspi-hwe-18-04ubuntu-upgrade-linux-image-raspi-nolpaeubuntu-upgrade-linux-image-raspi2ubuntu-upgrade-linux-image-snapdragon-hwe-18-04ubuntu-upgrade-linux-image-virtualubuntu-upgrade-linux-image-virtual-hwe-18-04ubuntu-upgrade-linux-image-virtual-hwe-20-04ubuntu-upgrade-linux-image-virtual-hwe-24-04ubuntu-upgrade-linux-image-xilinx-zynqmp
Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.