CVE-2025-40095
published high CVSS 3.1 · 7.8usb: gadget: f_rndis: Refactor bind path to use __free()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux45fe3b8e5342cd1ce307099459c74011d8e01986 to < ef81226bb1f8b6e761cd0b53d2696e9c1bc955d1 · 45fe3b8e5342cd1ce307099459c74011d8e01986 to < 5f65c8ad8c7292ed7e3716343fcd590a51818cc3 · 45fe3b8e5342cd1ce307099459c74011d8e01986 to < 380353c3a92be7d928e6f973bd065c5b79755ac3 · 45fe3b8e5342cd1ce307099459c74011d8e01986 to < a8366263b7e5b663d7fb489d3a9ba1e2600049a6 · 45fe3b8e5342cd1ce307099459c74011d8e01986 to < 08228941436047bdcd35a612c1aec0912a29d8cd · 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_rndis: Refactor bind path to use __free() After an bind/unbind cycle, the rndis->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 vulnerable path is the gadget bind/unbind sequence driven entirely by local writes to `/sys/kernel/config/usb_gadget/<g>/UDC` (or legacy gadget module load); no USB traffic from an attached host is involved, so this is a local syscall/filesystem-reachable bug rather than a physical-access one. AC:L - The attacker controls every step — the successful bind, the unbind that leaves `rndis->notify_req` dangling, and the forced failure of the next bind (e.g. exhausting `usb_interface_id()`/`usb_ep_autoconfig()` by reshaping a functionfs function between cycles), plus the heap spray that reclaims the freed `usb_request`. PR:L - Only local write access to the USB gadget configfs tree is needed, which on Android and embedded/industrial deployments is routinely delegated to non-root system/daemon accounts that drive USB function switching; no capability check exists in the bind path itself. UI:N - The attacker performs all configfs writes itself; no victim action, cable plug event, or interaction with any other user is required. S:U - The dangling-pointer free corrupts kernel heap state within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed. C:H - Use of the freed `usb_request` reads `->buf` out of reclaimed slab memory the attacker can groom, and the resulting arbitrary-free/double-free primitives enable object overlap and kernel memory disclosure. I:H - `kfree()` of an attacker-controlled pointer read from the freed request, plus a double free through `ep->ops->free_request`, yields classic heap-corruption primitives that can be leveraged into arbitrary write and privilege escalation. A:H - The immediate observed effect is a kernel oops — NULL/garbage `ep->ops` dereference in `usb_ep_free_request()` or slab corruption from the double free — panicking the system.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 45fe3b8e5342cd1ce307099459c74011d8e01986 to < ef81226bb1f8b6e761cd0b53d2696e9c1bc955d1 (affected · git)45fe3b8e5342cd1ce307099459c74011d8e01986 to < 5f65c8ad8c7292ed7e3716343fcd590a51818cc3 (affected · git)45fe3b8e5342cd1ce307099459c74011d8e01986 to < 380353c3a92be7d928e6f973bd065c5b79755ac3 (affected · git)45fe3b8e5342cd1ce307099459c74011d8e01986 to < a8366263b7e5b663d7fb489d3a9ba1e2600049a6 (affected · git)45fe3b8e5342cd1ce307099459c74011d8e01986 to < 08228941436047bdcd35a612c1aec0912a29d8cd (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/08228941436047bdcd35a612c1aec0912a29d8cd
- https://git.kernel.org/stable/c/380353c3a92be7d928e6f973bd065c5b79755ac3
- https://git.kernel.org/stable/c/5f65c8ad8c7292ed7e3716343fcd590a51818cc3
- https://git.kernel.org/stable/c/a8366263b7e5b663d7fb489d3a9ba1e2600049a6
- https://git.kernel.org/stable/c/ef81226bb1f8b6e761cd0b53d2696e9c1bc955d1
Provider assertions
1Linux · cna
usb: gadget: f_rndis: Refactor bind path to use __free()
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 63024182f89db2b25b90ada2b51f798bf18993a82447887b8ace14f0307e2994
- Ingested
- 23 Sep 2026, 08:48:04 UTC
- Source record
- Official CVE record