CVE-2025-40093
published high CVSS 3.1 · 7.8usb: gadget: f_ecm: Refactor bind path to use __free()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxda741b8c56d612b5dd26ffa31341911a5fea23ee to < d3745aaef19198d0c81637a7dd50ef53c4f879b7 · da741b8c56d612b5dd26ffa31341911a5fea23ee to < 070f341d86cf2c098d63e484a86c7c1d2696a868 · da741b8c56d612b5dd26ffa31341911a5fea23ee to < 15b9faf53ba8719700596e7ef78879ce200e8c2e · da741b8c56d612b5dd26ffa31341911a5fea23ee to < 4630c68bade82f087eaaab22e9a361da2f18d139 · da741b8c56d612b5dd26ffa31341911a5fea23ee to < 42988380ac67c76bb9dff8f77d7ef3eefd50b7b5 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux2.6.27 (affected) · 0 to < 2.6.27 (unaffected · semver) · 6.1.158 through 6.1.* (unaffected · semver) · 6.6.114 through 6.6.* (unaffected · semver) · 6.12.55 through 6.12.* (unaffected · semver) · 6.17.5 through 6.17.* (unaffected · semver) · 6.18 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Debian | bookworm | linux | Advisory build | 6.1.158-1 | DSA-6053-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| Ubuntu | jammy | linux-aws-6.8 | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Debian | bullseye | linux-6.1 | Advisory build | 6.1.158-1~deb11u1 | DLA-4379-1 |
Show 96 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devels390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develx86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermaarch64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermppc64le | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longterms390x | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermx86_64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macross390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosx86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourceaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourceppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sources390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourcex86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermaarch64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermppc64le | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longterms390x | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermx86_64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillaaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillappc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillas390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillax86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| Ubuntu | jammy | linux-aws-6.8-cloud-tools-6.8.0-1050 | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-aws-6.8-headers-6.8.0-1050 | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-aws-6.8-tools-6.8.0-1050 | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-azure-6.8 | Advisory build | 6.8.0-1051.57~22.04.1 | USN-8126-1 |
| Ubuntu | jammy | linux-azure-6.8-cloud-tools-6.8.0-1051 | Advisory build | 6.8.0-1051.57~22.04.1 | USN-8126-1 |
| Ubuntu | jammy | linux-azure-6.8-headers-6.8.0-1051 | Advisory build | 6.8.0-1051.57~22.04.1 | USN-8126-1 |
| Ubuntu | jammy | linux-azure-6.8-tools-6.8.0-1051 | Advisory build | 6.8.0-1051.57~22.04.1 | USN-8126-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1047-oracle | Advisory build | 6.8.0-1047.48~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1047-oracle-64k | Advisory build | 6.8.0-1047.48~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1049-ibm | Advisory build | 6.8.0-1049.49~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1049-nvidia | Advisory build | 6.8.0-1049.52~22.04.1 | USN-8100-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1049-nvidia-64k | Advisory build | 6.8.0-1049.52~22.04.1 | USN-8100-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1050-aws | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1050-aws-64k | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1051-azure | Advisory build | 6.8.0-1051.57~22.04.1 | USN-8126-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1052-gcp | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-1052-gcp-64k | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-106-generic | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-106-generic-64k | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-106-lowlatency | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.0-106-lowlatency-64k | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-buildinfo-6.8.1-1045-realtime | Advisory build | 6.8.1-1045.46~22.04.1 | USN-8095-3 |
| Ubuntu | jammy | linux-cloud-tools-6.8.0-1050-aws | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-cloud-tools-6.8.0-1050-aws-64k | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-cloud-tools-6.8.0-1051-azure | Advisory build | 6.8.0-1051.57~22.04.1 | USN-8126-1 |
| Ubuntu | jammy | linux-cloud-tools-6.8.0-106-generic | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-cloud-tools-6.8.0-106-lowlatency | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-cloud-tools-6.8.1-1045-realtime | Advisory build | 6.8.1-1045.46~22.04.1 | USN-8095-3 |
| Ubuntu | jammy | linux-gcp-6.8 | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-gcp-6.8-headers-6.8.0-1052 | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-gcp-6.8-tools-6.8.0-1052 | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-1047-oracle | Advisory build | 6.8.0-1047.48~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-1047-oracle-64k | Advisory build | 6.8.0-1047.48~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-1049-ibm | Advisory build | 6.8.0-1049.49~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-1049-nvidia | Advisory build | 6.8.0-1049.52~22.04.1 | USN-8100-1 |
| Ubuntu | jammy | linux-headers-6.8.0-1049-nvidia-64k | Advisory build | 6.8.0-1049.52~22.04.1 | USN-8100-1 |
| Ubuntu | jammy | linux-headers-6.8.0-1050-aws | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-headers-6.8.0-1050-aws-64k | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-headers-6.8.0-1051-azure | Advisory build | 6.8.0-1051.57~22.04.1 | USN-8126-1 |
| Ubuntu | jammy | linux-headers-6.8.0-1052-gcp | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-1052-gcp-64k | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-106-generic | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-106-generic-64k | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-106-lowlatency | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.0-106-lowlatency-64k | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-headers-6.8.1-1045-realtime | Advisory build | 6.8.1-1045.46~22.04.1 | USN-8095-3 |
| Ubuntu | jammy | linux-hwe-6.8 | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-hwe-6.8-cloud-tools-6.8.0-106 | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-hwe-6.8-headers-6.8.0-106 | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-hwe-6.8-tools-6.8.0-106 | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-ibm-6.8 | Advisory build | 6.8.0-1049.49~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-ibm-6.8-headers-6.8.0-1049 | Advisory build | 6.8.0-1049.49~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-ibm-6.8-tools-6.8.0-1049 | Advisory build | 6.8.0-1049.49~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-6.8.0-106-generic | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1047-oracle | Advisory build | 6.8.0-1047.48~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1047-oracle-64k | Advisory build | 6.8.0-1047.48~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1049-ibm | Advisory build | 6.8.0-1049.49~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1049-nvidia | Advisory build | 6.8.0-1049.52~22.04.1 | USN-8100-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1049-nvidia-64k | Advisory build | 6.8.0-1049.52~22.04.1 | USN-8100-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1050-aws | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1050-aws-64k | Advisory build | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1051-azure | Advisory build | 6.8.0-1051.57~22.04.1 | USN-8126-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1052-gcp | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-1052-gcp-64k | Advisory build | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-106-generic | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-106-generic-64k | Advisory build | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-106-lowlatency | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.0-106-lowlatency-64k | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-image-unsigned-6.8.1-1045-realtime | Advisory build | 6.8.1-1045.46~22.04.1 | USN-8095-3 |
| Ubuntu | jammy | linux-lowlatency-hwe-6.8 | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-lowlatency-hwe-6.8-cloud-tools-6.8.0-106 | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-lowlatency-hwe-6.8-headers-6.8.0-106 | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu | jammy | linux-lowlatency-hwe-6.8-lib-rust-6.8.0-106-lowlatency | Advisory build | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_ecm: Refactor bind path to use __free() After an bind/unbind cycle, the ecm->notify_req is left stale. If a subsequent bind fails, the unified error label attempts to free this stale request, leading to a NULL pointer dereference when accessing ep->ops->free_request. Refactor the error handling in the bind path to use the __free() automatic cleanup mechanism.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The entire bind/unbind/re-bind sequence that creates and then dereferences the stale `ecm->notify_req` is driven by local writes to `/sys/kernel/config/usb_gadget/<g>/UDC` and the function/config symlinks; no USB host traffic, cable event, or physical port access is required, so the bug is reachable purely through local filesystem/syscall access. AC:L - The attacker deterministically controls every step — the successful first bind, the unbind that leaves `ecm->notify_req`/`ecm->notify` dangling, and the forced failure of the next bind by exhausting `usb_interface_id()` (MAX_CONFIG_INTERFACES) or `usb_ep_autoconfig()` via extra functions linked into the config between cycles — plus the heap spray that reclaims the freed `usb_request`. No race or condition outside attacker control is involved. PR:L - `gadget_dev_desc_UDC_store()` and `ecm_bind()` perform no capability check at all; access is gated only by configfs file permissions, and on Android and embedded/industrial deployments the USB gadget configfs tree is routinely delegated to non-root system/daemon accounts that switch tethering (ECM/NCM/RNDIS) functions. UI:N - The attacker performs all configfs writes itself; no victim action, cable plug event, or interaction with another user is needed to reach the stale free. S:U - The dangling-pointer free and subsequent heap corruption stay within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed. C:H - `kfree(ecm->notify_req->buf)` reads a pointer out of the reclaimed `struct dummy_request`/`dwc3_request` slab and `usb_ep_free_request()` reads `ep->ops` out of a potentially freed `struct usb_ep`, so an attacker who grooms those generic kmalloc caches gains object-overlap and arbitrary-free primitives readily converted into kernel memory disclosure. I:H - `kfree()` of an attacker-controlled pointer read from the freed request, a double free of the `usb_request` itself, and an indirect call through a reclaimable `ep->ops` table together yield classic heap-corruption primitives leading to arbitrary write and privilege escalation. A:H - The directly observed effect is a kernel oops — NULL/garbage `ep->ops` dereference in `usb_ep_free_request()` — and the double free independently causes slab corruption and panic, which an unprivileged holder of the configfs tree can trigger repeatedly.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | da741b8c56d612b5dd26ffa31341911a5fea23ee to < d3745aaef19198d0c81637a7dd50ef53c4f879b7 (affected · git)da741b8c56d612b5dd26ffa31341911a5fea23ee to < 070f341d86cf2c098d63e484a86c7c1d2696a868 (affected · git)da741b8c56d612b5dd26ffa31341911a5fea23ee to < 15b9faf53ba8719700596e7ef78879ce200e8c2e (affected · git)da741b8c56d612b5dd26ffa31341911a5fea23ee to < 4630c68bade82f087eaaab22e9a361da2f18d139 (affected · git)da741b8c56d612b5dd26ffa31341911a5fea23ee to < 42988380ac67c76bb9dff8f77d7ef3eefd50b7b5 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 2.6.27 (affected)0 to < 2.6.27 (unaffected · semver)6.1.158 through 6.1.* (unaffected · semver)6.6.114 through 6.6.* (unaffected · semver)6.12.55 through 6.12.* (unaffected · semver)6.17.5 through 6.17.* (unaffected · semver)6.18 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
5- https://git.kernel.org/stable/c/070f341d86cf2c098d63e484a86c7c1d2696a868
- https://git.kernel.org/stable/c/15b9faf53ba8719700596e7ef78879ce200e8c2e
- https://git.kernel.org/stable/c/42988380ac67c76bb9dff8f77d7ef3eefd50b7b5
- https://git.kernel.org/stable/c/4630c68bade82f087eaaab22e9a361da2f18d139
- https://git.kernel.org/stable/c/d3745aaef19198d0c81637a7dd50ef53c4f879b7
Provider assertions
1Linux · cna
usb: gadget: f_ecm: Refactor bind path to use __free()
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- ecc4f9e2e7d530b00c5fb7c3de432cb8648c9f00793a5f63a66b226f8009d8a2
- Ingested
- 23 Sep 2026, 08:48:04 UTC
- Source record
- Official CVE record