CVE-2022-50876

usb: musb: Fix musb_gadget.c rxstate overflow bug

State
Published
Severity
Not scored
Published
Dec 30, 2025
Updated
May 11, 2026
Reserved
Dec 30, 2025

Read the record on cve.org

Description

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);

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before 826f84ab04a5cafe484ea9c2c85a3930068e5cb7Affected
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before a1008c8b9f357691ce6a8fdb8f157aecb2d79167Affected
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before 7c80f3a918ba9aa26fb699ee887064ec3af0396aAffected
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before d6afcab1b48f4051211c50145b9e91be3b1b42c9Affected
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before acf0006f2b2b2ca672988875fd154429aafb2a9bAffected
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before 3c84c7f592c4ba38f54ddaddd0115acc443025dbAffected
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before a9ccd2ab1becf5dcb6d57e9fcd981f5eaa606c96Affected
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before 523313881f0aa5cbbdb548ce575b6e58b202bd76Affected
  • 03840fad004ce8a56bc8b3bb60a2df10f6f9481e to before eea4c860c3b366369eff0489d94ee4f0571d467dAffected
LinuxLinux
  • 4.3Affected
  • before 4.3Not affected
  • 4.9.331 through 4.9.*Not affected
  • 4.14.296 through 4.14.*Not affected
  • 4.19.262 through 4.19.*Not affected
  • 5.4.220 through 5.4.*Not affected
  • 5.10.150 through 5.10.*Not affected
  • 5.15.75 through 5.15.*Not affected
  • 5.19.17 through 5.19.*Not affected
  • 6.0.3 through 6.0.*Not affected
  • 6.1 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.