CVE-2022-50876

Source
https://cve.org/CVERecord?id=CVE-2022-50876
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50876.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50876
Downstream
Related
Published
2025-12-30T12:23:16.790Z
Modified
2026-03-20T11:47:39.614220Z
Summary
usb: musb: Fix musb_gadget.c rxstate overflow bug
Details

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

usb: musb: Fix musb_gadget.c rxstate overflow bug

The usb function device call musbgadgetqueue() adds the passed request to musbep::reqlist,If the (request->length > musbep->packetsz) and (isbuffermapped(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);

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50876.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
03840fad004ce8a56bc8b3bb60a2df10f6f9481e
Fixed
826f84ab04a5cafe484ea9c2c85a3930068e5cb7
Fixed
a1008c8b9f357691ce6a8fdb8f157aecb2d79167
Fixed
7c80f3a918ba9aa26fb699ee887064ec3af0396a
Fixed
d6afcab1b48f4051211c50145b9e91be3b1b42c9
Fixed
acf0006f2b2b2ca672988875fd154429aafb2a9b
Fixed
3c84c7f592c4ba38f54ddaddd0115acc443025db
Fixed
a9ccd2ab1becf5dcb6d57e9fcd981f5eaa606c96
Fixed
523313881f0aa5cbbdb548ce575b6e58b202bd76
Fixed
eea4c860c3b366369eff0489d94ee4f0571d467d

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50876.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.3.0
Fixed
4.9.331
Type
ECOSYSTEM
Events
Introduced
4.10.0
Fixed
4.14.296
Type
ECOSYSTEM
Events
Introduced
4.15.0
Fixed
4.19.262
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.220
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.150
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.75
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.19.17
Type
ECOSYSTEM
Events
Introduced
5.20.0
Fixed
6.0.3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50876.json"