Skip to main content
EPSS 0.1%top 96%

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_ncm: Refactor bind path to use __free() After an bind/unbind… (CVE-2025-40092)

0
Medium
Published: 10/30/2025 (10/30/2025, 10:15:00 UTC)
Source: GCVE Database
Product: linux

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

CVSS v3.1

Score 7.8high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected software

Affected versions
<5.15.0-1100.107~20.04.2<5.15.0-1110.119~20.04.1<5.15.0-1100.109~20.04.1<5.15.0-170.180~20.04.3<5.15.0-1094.97~20.04.1

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 16:24:23 UTC

Technical Analysis

The vulnerability in the Linux kernel's usb gadget function f_ncm arises from improper error handling in the bind path. After a bind/unbind cycle, the ncm->notify_req remains stale. If a subsequent bind operation fails, the error handling code attempts to free this stale request, resulting in a NULL pointer dereference when accessing ep->ops->free_request. This leads to a kernel crash. The fix refactors the bind path to use the __free() automatic cleanup mechanism to prevent the stale pointer dereference.

Potential Impact

Successful exploitation causes a kernel NULL pointer dereference, leading to a denial of service via kernel crash. The impact includes complete loss of confidentiality, integrity, and availability as indicated by the CVSS vector (C:H/I:H/A:H). There is no indication of remote exploitability without local access, as the attack vector is local (AV:L).

Mitigation Recommendations

A fix has been implemented in the Linux kernel to refactor the bind path to use the __free() automatic cleanup mechanism, preventing the NULL pointer dereference. Users should apply the official kernel updates that include this fix. Patch status is not explicitly provided here; check the Linux kernel vendor advisory or distribution security updates for the official patch and remediation guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-68rx-wr32-vgh2
Osv Schema Version
1.4.0
Aliases
["CVE-2025-40092"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a6b72d69c2644c7f847aef3

Added to database: 07/30/2026, 15:50:46 UTC

Last enriched: 07/30/2026, 16:24:23 UTC

Last updated: 09/10/2026, 19:36:50 UTC

Views: 11

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses