# CVE-2022-50876: usb: musb: Fix musb\_gadget.c rxstate overflow bug

- Priority: **Routine**
- Reason: Not severe (CVSS 7, physical access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-12-30 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2022-50876, DEBIAN-CVE-2022-50876
- Record: https://cvemate.com/vulnerability/CVE-2022-50876 · JSON: https://cvemate.com/vulnerability/CVE-2022-50876/json

## Description

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

usb: musb: Fix musb_gadget.c rxstate overflow bug

The usb function device call musb_gadget_queue() adds the passed
request to musb_ep::req_list,If the (request->length > musb_ep->packet_sz)
and (is_buffer_mapped(req) return false),the rxstate() will copy all data
in fifo to request->buf which may cause request->buf out of bounds.

Fix it by add the length check :
fifocnt = min_t(unsigned, request->length - request->actual, fifocnt);
```

## Signals

- CVSS: 7 high (v4.0, OSV · Ubuntu) CVSS:4.0/AV:P/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- EPSS: 0.249%, percentile 17.354%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 124)

- debian linux (Debian): \< 6.0.3-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 4.15.0-204.215 \| \< 5.4.0-139.156 \| \< 5.15.0-60.66
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 4.15.0-1150.163 \| \< 5.4.0-1096.104 \| \< 5.15.0-1030.34
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1030.34~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1096.104~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-fips (Ubuntu): \< 4.15.0-2089.95 \| All versions (No fix recorded) \| \< 5.4.0-1096.104+fips1
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1151.164~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1162.177~14.04.1 \| \< 4.15.0-1162.177~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1103.109 \| \< 5.15.0-1033.40
- ubuntu linux-azure-4.15 (Ubuntu): \< 4.15.0-1161.176
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/826f84ab04a5cafe484ea9c2c85a3930068e5cb7>
- <https://git.kernel.org/stable/c/a1008c8b9f357691ce6a8fdb8f157aecb2d79167>
- <https://git.kernel.org/stable/c/7c80f3a918ba9aa26fb699ee887064ec3af0396a>
- <https://git.kernel.org/stable/c/d6afcab1b48f4051211c50145b9e91be3b1b42c9>
- <https://git.kernel.org/stable/c/acf0006f2b2b2ca672988875fd154429aafb2a9b>
- <https://git.kernel.org/stable/c/3c84c7f592c4ba38f54ddaddd0115acc443025db>
- <https://git.kernel.org/stable/c/a9ccd2ab1becf5dcb6d57e9fcd981f5eaa606c96>
- <https://git.kernel.org/stable/c/523313881f0aa5cbbdb548ce575b6e58b202bd76>
- <https://git.kernel.org/stable/c/eea4c860c3b366369eff0489d94ee4f0571d467d>
- <https://ubuntu.com/security/CVE-2022-50876>
- <https://www.cve.org/CVERecord?id=CVE-2022-50876>
- <https://git.kernel.org/linus/eea4c860c3b366369eff0489d94ee4f0571d467d>
- <https://security-tracker.debian.org/tracker/CVE-2022-50876>

---

Data as of 2026-12-06T04:48:38.595Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
