# CVE-2022-49980: USB: gadget: Fix use-after-free Read in usb\_udc\_uevent()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.27% (percentile 12, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-06-18T11:00:42.433Z
- **Modified:** 2026-06-17T05:19:40.303Z

## Who should check

- Anyone running Linux \>= 2ccea03a8f7ec93641791f2760d7cdc6cab6205f, \< f44b0b95d50fffeca036e1ba36770390e0b519dd; \>= 2ccea03a8f7ec93641791f2760d7cdc6cab6205f, \< 2191c00855b03aa59c20e698be713d952d51fc18
- Anyone running Linux 3.1

## Description

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

USB: gadget: Fix use-after-free Read in usb\_udc\_uevent()

The syzbot fuzzer found a race between uevent callbacks and gadget
driver unregistration that can cause a use-after-free bug:

---------------------------------------------------------------
BUG: KASAN: use-after-free in usb\_udc\_uevent+0x11f/0x130
drivers/usb/gadget/udc/core.c:1732
Read of size 8 at addr ffff888078ce2050 by task udevd/2968

CPU: 1 PID: 2968 Comm: udevd Not tainted 5.19.0-rc4-next-20220628-syzkaller \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google
06/29/2022
Call Trace:
 \<TASK\>
 \_\_dump\_stack lib/dump\_stack.c:88 \[inline\]
 dump\_stack\_lvl+0xcd/0x134 lib/dump\_stack.c:106
 print\_address\_description mm/kasan/report.c:317 \[inline\]
 print\_report.cold+0x2ba/0x719 mm/kasan/report.c:433
 kasan\_report+0xbe/0x1f0 mm/kasan/report.c:495
 usb\_udc\_uevent+0x11f/0x130 drivers/usb/gadget/udc/core.c:1732
 dev\_uevent+0x290/0x770 drivers/base/core.c:2424
---------------------------------------------------------------

The bug occurs because usb\_udc\_uevent() dereferences udc-\>driver but
does so without acquiring the udc\_lock mutex, which protects this
field.  If the gadget driver is unbound from the udc concurrently with
uevent processing, the driver structure may be accessed after it has
been deallocated.

To prevent the race, we make sure that the routine holds the mutex
around the racing accesses.

## Affected and fixed versions

- Linux: \>= 2ccea03a8f7ec93641791f2760d7cdc6cab6205f, \< f44b0b95d50fffeca036e1ba36770390e0b519dd; \>= 2ccea03a8f7ec93641791f2760d7cdc6cab6205f, \< 2191c00855b03aa59c20e698be713d952d51fc18 (cvelist)
- Linux: 3.1 (cvelist)

## Mitigation

- Upgrade Linux to 2191c00855b03aa59c20e698be713d952d51fc18 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49980. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49980.md
Affected: Linux >= 2ccea03a8f7ec93641791f2760d7cdc6cab6205f, < f44b0b95d50fffeca036e1ba36770390e0b519dd; >= 2ccea03a8f7ec93641791f2760d7cdc6cab6205f, < 2191c00855b03aa59c20e698be713d952d51fc18; Linux 3.1
Fixed in: Linux 2191c00855b03aa59c20e698be713d952d51fc18

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49980 being exploited?

There is no confirmed exploitation: CVE-2022-49980 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49980?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49980?

Linux \>= 2ccea03a8f7ec93641791f2760d7cdc6cab6205f, \< f44b0b95d50fffeca036e1ba36770390e0b519dd; \>= 2ccea03a8f7ec93641791f2760d7cdc6cab6205f, \< 2191c00855b03aa59c20e698be713d952d51fc18; Linux 3.1.

### Is there a fix for CVE-2022-49980?

Yes. Fixed in Linux 2191c00855b03aa59c20e698be713d952d51fc18. Upgrade Linux to 2191c00855b03aa59c20e698be713d952d51fc18 or later.

### How do I check if I'm affected by CVE-2022-49980?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/f44b0b95d50fffeca036e1ba36770390e0b519dd>
- patch: <https://git.kernel.org/stable/c/2191c00855b03aa59c20e698be713d952d51fc18>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49980>

HTML: <https://flawdb.com/CVE-2022-49980> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49980>
