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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.82-1 | DEBIAN-CVE-2024-26748 |
| Debian:13 | linux | 6.7.7-1 | DEBIAN-CVE-2024-26748 |
| Debian:14 | linux | 6.7.7-1 | DEBIAN-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux | 5.15.0-112.122 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux | 5.15.0-112.122 | USN-6820-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1063.69 | USN-6821-3 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1063.69 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | 6.5.0-1023.23~22.04.1 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1066.75 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1066.75 | USN-6821-4 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | 6.5.0-1024.25~22.04.1 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1065.74.1 | USN-6821-4 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1067.76.1 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1062.70 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1062.70 | USN-6820-1 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | 6.5.0-1024.26~22.04.1 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1060.66 | USN-6821-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1060.66 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1046.53 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1046.53 | USN-6821-2 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | 6.5.0-44.44~22.04.1 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1056.59 | USN-6821-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1056.59 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1058.64 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1058.64 | USN-6821-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1060.65 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1060.65 | USN-6821-2 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-110.120 | USN-6820-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-110.120 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | 6.5.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1058.59 | USN-6820-2 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1058.59 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 6.5.0-1023.24 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1026.26 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1015.15 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | 6.5.0-1027.28 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1061.67 | USN-6821-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1061.67 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | 6.5.0-1026.26~22.04.1 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1058.61 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1058.61 | USN-6919-1 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | 6.5.0-1017.18~22.04.1 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1030.34 | UBUNTU-CVE-2024-26748 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1030.34 | USN-6820-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 7733f6c32e36ff9d7adadf40001039bf219b1cbe – before aad6132ae6e4809e375431f8defd1521985e44e77733f6c32e36ff9d7adadf40001039bf219b1cbe – before 1e204a8e9eb514e22a6567fb340ebb47df3f3a487733f6c32e36ff9d7adadf40001039bf219b1cbe – before 3a2a909942b5335b7ea66366d84261b3ed5f89c87733f6c32e36ff9d7adadf40001039bf219b1cbe – before 9a52b694b066f299d8b9800854a8503457a8b64c7733f6c32e36ff9d7adadf40001039bf219b1cbe – before 70e8038813f9d3e72df966748ebbc40efe4660197733f6c32e36ff9d7adadf40001039bf219b1cbe – before 92d20406a3d4ff3e8be667c79209dc9ed31df5b37733f6c32e36ff9d7adadf40001039bf219b1cbe – before 5fd9e45f1ebcd57181358af28506e8a661a260b3 |
| Linux | Linux | 5.4 |
References
- https://git.kernel.org/stable/c/aad6132ae6e4809e375431f8defd1521985e44e7
- https://git.kernel.org/stable/c/1e204a8e9eb514e22a6567fb340ebb47df3f3a48
- https://git.kernel.org/stable/c/3a2a909942b5335b7ea66366d84261b3ed5f89c8
- https://git.kernel.org/stable/c/9a52b694b066f299d8b9800854a8503457a8b64c
- https://git.kernel.org/stable/c/70e8038813f9d3e72df966748ebbc40efe466019
- https://git.kernel.org/stable/c/92d20406a3d4ff3e8be667c79209dc9ed31df5b3
- https://git.kernel.org/stable/c/5fd9e45f1ebcd57181358af28506e8a661a260b3
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html x_transferred