CVE-2024-26748 json
usb: cdns3: fix memory double free when handle zero packet
published 2024-04-03 2 y ago modified 2026-08-05 3 mo ago also EUVD-2024-24010
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 15%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 5.4.270, 5.10.211, 5.15.150, 6.1.80, 6.6.19, 6.7.7, 6.8
- linux Debian 12 6.1.82-1
- linux Debian 14, Debian 13 6.7.7-1
debian advisories DEBIAN-CVE-2024-26748
- linux Ubuntu 20.04 LTS 5.4.0-186.206
- linux Ubuntu 22.04 LTS 5.15.0-112.122
- linux-aws Ubuntu 20.04 LTS 5.4.0-1126.136
- linux-aws Ubuntu 22.04 LTS 5.15.0-1063.69
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1130.139
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1062.70
- linux-gke Ubuntu 22.04 LTS 5.15.0-1060.66
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1073.78
ubuntu advisories UBUNTU-CVE-2024-26748
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- dtb-aarch64 openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-64kb SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-syms SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-obs-qa openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-source SLE Module for Development Tools 15 SP5, SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-default SLE Workstation Extension 15 SP5, SLE Module for Legacy 15 SP5, SLE Module for Basesystem 15 SP5 +4 more 5.14.21-150500.55.68.1
- kernel-kvmsmall openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-zfcpdump SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.68.1
suse advisories SUSE-SU-2024:2190-1SUSE-SU-2024:2019-1SUSE-SU-2024:2008-1
- git.kernel.org/stable/c/aad6132ae6e4809e375431f8defd1521985e44e7 commit
- git.kernel.org/stable/c/1e204a8e9eb514e22a6567fb340ebb47df3f3a48 commit
- git.kernel.org/stable/c/3a2a909942b5335b7ea66366d84261b3ed5f89c8 commit
- git.kernel.org/stable/c/9a52b694b066f299d8b9800854a8503457a8b64c commit
- git.kernel.org/stable/c/70e8038813f9d3e72df966748ebbc40efe466019 commit
- git.kernel.org/stable/c/92d20406a3d4ff3e8be667c79209dc9ed31df5b3 commit
- git.kernel.org/stable/c/5fd9e45f1ebcd57181358af28506e8a661a260b3 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-26748 updated cvss 4.4
kernel: usb: cdns3: fix memory double free when handle zero packet
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-25-226-15 updated
Siemens SINEC OS
-
Siemens RUGGEDCOM RST2428P (6GK6242-6PA00) Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family Siemens SCALANCE XCM-/XRM-/XCH-/XRH-300 familynot affected
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.24% chance of exploitation in the next 30 days, higher than 15% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-415 Double Free
- Technology feeds
References
-
git.kernel.org
/stable/c/aad6132ae6e4809e375431f8defd1521985e44e7
patch
-
git.kernel.org
/stable/c/1e204a8e9eb514e22a6567fb340ebb47df3f3a48
patch
-
git.kernel.org
/stable/c/3a2a909942b5335b7ea66366d84261b3ed5f89c8
patch
-
git.kernel.org
/stable/c/9a52b694b066f299d8b9800854a8503457a8b64c
patch
-
git.kernel.org
/stable/c/70e8038813f9d3e72df966748ebbc40efe466019
patch
-
git.kernel.org
/stable/c/92d20406a3d4ff3e8be667c79209dc9ed31df5b3
patch
-
git.kernel.org
/stable/c/5fd9e45f1ebcd57181358af28506e8a661a260b3
patch
-
lists.debian.org
/debian-lts-announce/2024/06/msg00017.html
mailing-list
Sources
- CVE List CVE-2024-26748
- NVD CVE-2024-26748
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.