Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-40092

published high CVSS 3.1 · 7.8

usb: gadget: f_ncm: Refactor bind path to use __free()

Published
30 Oct 2025, 09:47:59 UTC
Updated
05 Aug 2026, 12:07:43 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux9f6ce4240a2bf456402c15c06768059e5973f28c to < 185193a4714aa9c78437a7a1858fbe5771f0f45c · 9f6ce4240a2bf456402c15c06768059e5973f28c to < f37de8dec6a4c379b4b8486003a1de00ff8cff3b · 9f6ce4240a2bf456402c15c06768059e5973f28c to < 1cde4516295a030cb8ab4c93114ca3b6c3c6a1e2 · 9f6ce4240a2bf456402c15c06768059e5973f28c to < d3fe7143928d8dfa2ec7bac9f906b48bc75b98ee · 9f6ce4240a2bf456402c15c06768059e5973f28c to < ed78f4d6079d872432b1ed54f155ef61965d3137 · 9f6ce4240a2bf456402c15c06768059e5973f28c to < 75a5b8d4ddd4eb6b16cb0b475d14ff4ae64295ef · Other versions: unaffected Affected Not stated Linux
Linux — Linux2.6.38 (affected) · 0 to < 2.6.38 (unaffected · semver) · 5.15.196 through 5.15.* (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
Oracle Linux 8 bpftoolaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
SUSE / openSUSE openSUSE-Tumbleweed kernel-develaarch64 Advisory build 6.17.7-1.1 OPENSUSE-SU-2025:15702-1
Ubuntu focal linux-aws-5.15 Advisory build 5.15.0-1100.107~20.04.2 USN-8033-4
Show 96 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Debian bullseye linux-6.1 Advisory build 6.1.158-1~deb11u1 DLA-4379-1
Oracle Linux 8 bpftoolx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uekaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uekx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-containeraarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-containerx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-container-debugaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-container-debugx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-corex86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debugaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debugx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-corex86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-develx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-modulesx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-modules-extrax86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-develx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-docaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-docx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-modulesx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-modules-extrax86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 9 bpftoolaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 bpftoolx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uekaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uekx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-containeraarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-containerx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-container-debugaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-container-debugx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-corex86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debugaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debugx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-corex86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-develx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-modulesx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-modules-extrax86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-develx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-docaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-docx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-modulesx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-modules-extrax86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64kaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64k-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64k-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64k-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64k-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
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 focal linux-aws-5.15-cloud-tools-5.15.0-1100 Advisory build 5.15.0-1100.107~20.04.2 USN-8033-4
Ubuntu focal linux-aws-5.15-headers-5.15.0-1100 Advisory build 5.15.0-1100.107~20.04.2 USN-8033-4
Ubuntu focal linux-aws-5.15-tools-5.15.0-1100 Advisory build 5.15.0-1100.107~20.04.2 USN-8033-4
Ubuntu focal linux-azure-5.15 Advisory build 5.15.0-1110.119~20.04.1 USN-8243-1
Ubuntu focal linux-azure-5.15-cloud-tools-5.15.0-1110 Advisory build 5.15.0-1110.119~20.04.1 USN-8243-1
Ubuntu focal linux-azure-5.15-headers-5.15.0-1110 Advisory build 5.15.0-1110.119~20.04.1 USN-8243-1
Ubuntu focal linux-azure-5.15-tools-5.15.0-1110 Advisory build 5.15.0-1110.119~20.04.1 USN-8243-1
Ubuntu focal linux-buildinfo-5.15.0-1052-nvidia-tegra Advisory build 5.15.0-1052.52~20.04.2 USN-8034-1
Ubuntu focal linux-buildinfo-5.15.0-1052-nvidia-tegra-rt Advisory build 5.15.0-1052.52~20.04.2 USN-8034-1
Ubuntu focal linux-buildinfo-5.15.0-1094-ibm Advisory build 5.15.0-1094.97~20.04.1 USN-8033-1
Ubuntu focal linux-buildinfo-5.15.0-1095-intel-iotg Advisory build 5.15.0-1095.101~20.04.1 USN-8033-7
Ubuntu focal linux-buildinfo-5.15.0-1097-oracle Advisory build 5.15.0-1097.103~20.04.1 USN-8033-5

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_ncm: Refactor bind path to use __free() After an bind/unbind cycle, the ncm->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. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 Call trace: usb_ep_free_request+0x2c/0xec ncm_bind+0x39c/0x3dc usb_add_function+0xcc/0x1f0 configfs_composite_bind+0x468/0x588 gadget_bind_driver+0x104/0x270 really_probe+0x190/0x374 __driver_probe_device+0xa0/0x12c driver_probe_device+0x3c/0x218 __device_attach_driver+0x14c/0x188 bus_for_each_drv+0x10c/0x168 __device_attach+0xfc/0x198 device_initial_probe+0x14/0x24 bus_probe_device+0x94/0x11c device_add+0x268/0x48c usb_add_gadget+0x198/0x28c dwc3_gadget_init+0x700/0x858 __dwc3_set_mode+0x3cc/0x664 process_scheduled_works+0x1d8/0x488 worker_thread+0x244/0x334 kthread+0x114/0x1bc ret_from_fork+0x10/0x20

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

41

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 → failing-rebind sequence that dereferences the stale `ncm->notify_req` is driven by local writes to `/sys/kernel/config/usb_gadget/<g>/UDC` and function/config symlinks; no USB host traffic, cable event, or physical port access is required since any UDC (including dummy_hcd) suffices. AC:L - The attacker deterministically controls each step — the first successful `ncm_bind()`, the `purge_configs_funcs()`/unbind that leaves `ncm->notify_req` and `ncm->notify` dangling, and the forced failure of the next bind by exhausting `usb_interface_id()` (MAX_CONFIG_INTERFACES) or `usb_ep_autoconfig()` with extra functions linked in between cycles — plus the heap spray reclaiming the freed `usb_request`. No race or condition outside attacker control is involved. PR:L - `gadget_dev_desc_UDC_store()` and `ncm_bind()` perform no capability check whatsoever; access is gated only by configfs file permissions, and on Android and embedded/industrial systems the USB gadget configfs tree is routinely delegated to non-root system/daemon accounts that switch tethering (NCM/ECM/RNDIS) functions. UI:N - The attacker performs all configfs writes itself; no victim action, cable plug/unplug, or interaction with another user is needed to reach the stale free. S:U - The dangling-pointer free and resulting heap corruption remain within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed. C:H - `kfree(ncm->notify_req->buf)` reads a pointer out of the reclaimed `usb_request` (e.g. `dummy_request`/`dwc3_request`) slab object and `usb_ep_free_request()` reads `ep->ops` from a potentially freed `struct usb_ep`, so an attacker grooming 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()` per the reported call trace — and the double free independently causes slab corruption and panic, repeatable at will by whoever holds the configfs tree.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 9f6ce4240a2bf456402c15c06768059e5973f28c to < 185193a4714aa9c78437a7a1858fbe5771f0f45c (affected · git)9f6ce4240a2bf456402c15c06768059e5973f28c to < f37de8dec6a4c379b4b8486003a1de00ff8cff3b (affected · git)9f6ce4240a2bf456402c15c06768059e5973f28c to < 1cde4516295a030cb8ab4c93114ca3b6c3c6a1e2 (affected · git)9f6ce4240a2bf456402c15c06768059e5973f28c to < d3fe7143928d8dfa2ec7bac9f906b48bc75b98ee (affected · git)9f6ce4240a2bf456402c15c06768059e5973f28c to < ed78f4d6079d872432b1ed54f155ef61965d3137 (affected · git)9f6ce4240a2bf456402c15c06768059e5973f28c to < 75a5b8d4ddd4eb6b16cb0b475d14ff4ae64295ef (affected · git)Default: unaffected Linux · cna
Linux Linux 2.6.38 (affected)0 to < 2.6.38 (unaffected · semver)5.15.196 through 5.15.* (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

0

No weakness assertions.

References

6

Provider assertions

1

Linux · cna

usb: gadget: f_ncm: Refactor bind path to use __free()

Provenance

Schema
5.2
Searchable
yes
Content hash
9d9db812df141074921bd781186896c99c277962e28802799a53989dba54cb08
Ingested
23 Sep 2026, 08:48:04 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected