# CVE-2026-98765: USB: gadget: dummy-hcd: Fix wait for outstanding request completions

> A race condition in the Linux kernel dummy-hcd driver allows unloading modules during completion callbacks, potentially leading to code execution or privilege escalation.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Oct 2026
- **Updated:** 21 Oct 2026
- **Also known as:** AZL-108887, BELL-CVE-2026-98765, DEBIAN-CVE-2026-98765, GHSA-84fc-mwqj-5rjh, UBUNTU-CVE-2026-98765

## What is CVE-2026-98765?

CVE-2026-98765 is a vulnerability in Linux, published on 18 Oct 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In the Linux kernel, the following vulnerability has been resolved:

USB: gadget: dummy-hcd: Fix wait for outstanding request completions

The dummy-hcd driver emulates synchronize_irq() by waiting until its
private callback_usage counter drops to 0 (with the private lock not
held).  This counter is incremented whenever a gadget driver callback
occurs (which requires the private lock to be dropped), but not when a
request completion handler is called.

This is an oversight.  Request completion is triggered by timer
interrupts (emulating device IRQs in a real UDC), and the interrupt
handlers are supposed to have completed when the synchronize_irq()
emulation routine returns -- they aren't supposed to be in the middle
of a completion callback.  If this happens it can lead to a gadget
driver's unbind routine running before all outstanding request
completions have finished, maybe even allowing the gadget driver's
module to be unloaded while a completion handler is still running.

Fix the oversight by incrementing the callback_usage value across
request completion callbacks.

## Which versions are affected by CVE-2026-98765?


## How do I fix CVE-2026-98765?

Apply the vendor's patch.

## Is CVE-2026-98765 being exploited?

There is no known exploitation of CVE-2026-98765 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-98765 and fix it if it is affected.

What it is: CVE-2026-98765 is a vulnerability in Linux, published on 18 Oct 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-98765 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-98765/ (Markdown: https://insights.sbomify.com/CVE-2026-98765/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-98765
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-98765
- OSV: https://osv.dev/vulnerability/CVE-2026-98765

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-98765/
Summaries are generated and may contain mistakes; the official description above is the record.
