# CVE-2022-49661: can: gs\_usb: gs\_usb\_open/close(): fix memory leak

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-02-26T02:23:58.352Z
- **Modified:** 2026-06-17T05:18:46.807Z

## Who should check

- Anyone running Linux \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 339fa9f80d3b94177a7a459c6d115d3b56007d5a; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< c1d806bc29ff7ffe0e2a023583c8720ed96cb0b0; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< d91492638b054f4a359621ef216242be5973ed6b; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 6f655b5e13fa4b27e915b6c209ac0da74fd75963; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< d0b8e223998866b3e7b2895927d4e9689b0a80d8; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 0e60230bc64355c80abe993d1719fdb318094e20; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< ffb6cc6601ec7c8fa963dcf76025df4a02f2cf5c; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 2bda24ef95c0311ab93bda00db40486acf30bd0a
- Anyone running Linux 3.16

## Description

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

can: gs\_usb: gs\_usb\_open/close(): fix memory leak

The gs\_usb driver appears to suffer from a malady common to many USB
CAN adapter drivers in that it performs usb\_alloc\_coherent() to
allocate a number of USB request blocks (URBs) for RX, and then later
relies on usb\_kill\_anchored\_urbs() to free them, but this doesn't
actually free them. As a result, this may be leaking DMA memory that's
been used by the driver.

This commit is an adaptation of the techniques found in the esd\_usb2
driver where a similar design pattern led to a memory leak. It
explicitly frees the RX URBs and their DMA memory via a call to
usb\_free\_coherent(). Since the RX URBs were allocated in the
gs\_can\_open(), we remove them in gs\_can\_close() rather than in the
disconnect function as was done in esd\_usb2.

For more information, see the 928150fad41b ("can: esd\_usb2: fix memory
leak").

## Affected and fixed versions

- Linux: \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 339fa9f80d3b94177a7a459c6d115d3b56007d5a; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< c1d806bc29ff7ffe0e2a023583c8720ed96cb0b0; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< d91492638b054f4a359621ef216242be5973ed6b; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 6f655b5e13fa4b27e915b6c209ac0da74fd75963; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< d0b8e223998866b3e7b2895927d4e9689b0a80d8; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 0e60230bc64355c80abe993d1719fdb318094e20; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< ffb6cc6601ec7c8fa963dcf76025df4a02f2cf5c; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 2bda24ef95c0311ab93bda00db40486acf30bd0a (cvelist)
- Linux: 3.16 (cvelist)

## Mitigation

- Upgrade Linux to 2bda24ef95c0311ab93bda00db40486acf30bd0a 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-49661. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49661.md
Affected: Linux >= d08e973a77d128b25e01a08c34d89593fdf222da, < 339fa9f80d3b94177a7a459c6d115d3b56007d5a; >= d08e973a77d128b25e01a08c34d89593fdf222da, < c1d806bc29ff7ffe0e2a023583c8720ed96cb0b0; >= d08e973a77d128b25e01a08c34d89593fdf222da, < d91492638b054f4a359621ef216242be5973ed6b; >= d08e973a77d128b25e01a08…
Fixed in: Linux 339fa9f80d3b94177a7a459c6d115d3b56007d5a, Linux 6f655b5e13fa4b27e915b6c209ac0da74fd75963, Linux 0e60230bc64355c80abe993d1719fdb318094e20, Linux 2bda24ef95c0311ab93bda00db40486acf30bd0a

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-49661 being exploited?

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

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

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

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

Linux \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 339fa9f80d3b94177a7a459c6d115d3b56007d5a; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< c1d806bc29ff7ffe0e2a023583c8720ed96cb0b0; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< d91492638b054f4a359621ef216242be5973ed6b; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 6f655b5e13fa4b27e915b6c209ac0da74fd75963; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< d0b8e223998866b3e7b2895927d4e9689b0a80d8; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 0e60230bc64355c80abe993d1719fdb318094e20; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< ffb6cc6601ec7c8fa963dcf76025df4a02f2cf5c; \>= d08e973a77d128b25e01a08c34d89593fdf222da, \< 2bda24ef95c0311ab93bda00db40486acf30bd0a; Linux 3.16.

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

Yes. Fixed in Linux 339fa9f80d3b94177a7a459c6d115d3b56007d5a, Linux 6f655b5e13fa4b27e915b6c209ac0da74fd75963, Linux 0e60230bc64355c80abe993d1719fdb318094e20, Linux 2bda24ef95c0311ab93bda00db40486acf30bd0a. Upgrade Linux to 2bda24ef95c0311ab93bda00db40486acf30bd0a or later.

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

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/339fa9f80d3b94177a7a459c6d115d3b56007d5a>
- patch: <https://git.kernel.org/stable/c/c1d806bc29ff7ffe0e2a023583c8720ed96cb0b0>
- patch: <https://git.kernel.org/stable/c/d91492638b054f4a359621ef216242be5973ed6b>
- patch: <https://git.kernel.org/stable/c/6f655b5e13fa4b27e915b6c209ac0da74fd75963>
- patch: <https://git.kernel.org/stable/c/d0b8e223998866b3e7b2895927d4e9689b0a80d8>
- patch: <https://git.kernel.org/stable/c/0e60230bc64355c80abe993d1719fdb318094e20>
- patch: <https://git.kernel.org/stable/c/ffb6cc6601ec7c8fa963dcf76025df4a02f2cf5c>
- patch: <https://git.kernel.org/stable/c/2bda24ef95c0311ab93bda00db40486acf30bd0a>

## 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-49661>

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