Vulnerability · Published Apr 3, 2024 · Assigned by Linux

CVE-2024-26748usb: cdns3: fix memory double free when handle zero packet

High 7.8

In plain English

A high-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 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 84.3% 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: usb: cdns3: fix memory double free when handle zero packet 829 if (request->complete) { 830 spin_unlock(&priv_dev->lock); 831 usb_gadget_giveback_request(&priv_ep->endpoint, 832 request); 833 spin_lock(&priv_dev->lock); 834 } 835 836 if (request->buf == priv_dev->zlp_buf) 837 cdns3_gadget_ep_free_request(&priv_ep->endpoint, request); Driver append an additional zero packet request when queue a packet, which length mod max packet size is 0. When transfer complete, run to line 831, usb_gadget_giveback_request() will free this requestion. 836 condition is true, so cdns3_gadget_ep_free_request() free this request again. Log: [ 1920.140696][ T150] BUG: KFENCE: use-after-free read in cdns3_gadget_giveback+0x134/0x2c0 [cdns3] [ 1920.140696][ T150] [ 1920.151837][ T150] Use-after-free read at 0x000000003d1cd10b (in kfence-#36): [ 1920.159082][ T150] cdns3_gadget_giveback+0x134/0x2c0 [cdns3] [ 1920.164988][ T150] cdns3_transfer_completed+0x438/0x5f8 [cdns3] Add check at line 829, skip call usb_gadget_giveback_request() if it is additional zero length packet request. Needn't call usb_gadget_giveback_request() because it is allocated in this driver.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.82-1DEBIAN-CVE-2024-26748
Debian:13linux6.7.7-1DEBIAN-CVE-2024-26748
Debian:14linux6.7.7-1DEBIAN-CVE-2024-26748
Ubuntu:22.04:LTSlinux5.15.0-112.122UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux5.15.0-112.122USN-6820-1
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-aws5.15.0-1063.69USN-6821-3
Ubuntu:22.04:LTSlinux-aws5.15.0-1063.69UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-aws-6.56.5.0-1023.23~22.04.1UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-azure5.15.0-1066.75UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-azure5.15.0-1066.75USN-6821-4
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1024.25~22.04.1UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1065.74.1USN-6821-4
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1067.76.1UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-gcp5.15.0-1062.70UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-gcp5.15.0-1062.70USN-6820-1
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1024.26~22.04.1UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-gke5.15.0-1060.66USN-6821-1
Ubuntu:22.04:LTSlinux-gke5.15.0-1060.66UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1046.53UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1046.53USN-6821-2
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-44.44~22.04.1UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-ibm5.15.0-1056.59USN-6821-1
Ubuntu:22.04:LTSlinux-ibm5.15.0-1056.59UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1058.64UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1058.64USN-6821-1
Ubuntu:22.04:LTSlinux-kvm5.15.0-1060.65UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-kvm5.15.0-1060.65USN-6821-2
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-110.120USN-6820-1
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-110.120UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-44.44.1~22.04.1UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1058.59USN-6820-2
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1058.59UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1023.24UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1026.26UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1015.15UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1027.28UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-oracle5.15.0-1061.67USN-6821-1
Ubuntu:22.04:LTSlinux-oracle5.15.0-1061.67UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1026.26~22.04.1UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-raspi5.15.0-1058.61UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-raspi5.15.0-1058.61USN-6919-1
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1017.18~22.04.1UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34UBUNTU-CVE-2024-26748
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34USN-6820-1

Affected products (as reported)

VendorProductVersions
Linux Linux 7733f6c32e36ff9d7adadf40001039bf219b1cbe – before aad6132ae6e4809e375431f8defd1521985e44e77733f6c32e36ff9d7adadf40001039bf219b1cbe – before 1e204a8e9eb514e22a6567fb340ebb47df3f3a487733f6c32e36ff9d7adadf40001039bf219b1cbe – before 3a2a909942b5335b7ea66366d84261b3ed5f89c87733f6c32e36ff9d7adadf40001039bf219b1cbe – before 9a52b694b066f299d8b9800854a8503457a8b64c7733f6c32e36ff9d7adadf40001039bf219b1cbe – before 70e8038813f9d3e72df966748ebbc40efe4660197733f6c32e36ff9d7adadf40001039bf219b1cbe – before 92d20406a3d4ff3e8be667c79209dc9ed31df5b37733f6c32e36ff9d7adadf40001039bf219b1cbe – before 5fd9e45f1ebcd57181358af28506e8a661a260b3
Linux Linux 5.4

References