usb: musb: Fix musb_gadget.c rxstate overflow bug
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);
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 4.14.296, 4.19.262, 4.9.331, 5.10.150, 5.15.75, 5.19.17, 5.4.220, 6.0.3
- CVEs
- CVE-2022-50876
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 02:30 UTC · Revision 1
Source evidence
usb: musb: Fix musb_gadget.c rxstate overflow bug
core-osv · Original sourcePublished 30 Dec 2025, 12:23 UTC
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);
osv:CVE-2022-50876
Kernel
Fixed versions: 4.9.331, 4.14.296, 4.19.262, 5.4.220, 5.10.150, 5.15.75, 5.19.17, 6.0.3
Complete source record
{
"id": "b2dfc9e8b943e4b7090f7d0fc244c782557b189d1726cfd71415d92aeca46048",
"url": "https://osv.dev/vulnerability/CVE-2022-50876",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "usb: musb: Fix musb_gadget.c rxstate overflow bug",
"summary": "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);",
"evidence": "osv:CVE-2022-50876",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.9.331",
"evidence": "/affected/1/ranges"
},
{
"value": "4.14.296",
"evidence": "/affected/1/ranges"
},
{
"value": "4.19.262",
"evidence": "/affected/1/ranges"
},
{
"value": "5.4.220",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.150",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.75",
"evidence": "/affected/1/ranges"
},
{
"value": "5.19.17",
"evidence": "/affected/1/ranges"
},
{
"value": "6.0.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2022-50876",
"aliases": [
"CVE-2022-50876"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "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/cve-osv-conversion/osv-output/CVE-2022-50876.json"
}
},
{
"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"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50876.json"
}
}
],
"modified": "2026-10-28T02:30:52.770049789Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/3c84c7f592c4ba38f54ddaddd0115acc443025db",
"https://git.kernel.org/stable/c/523313881f0aa5cbbdb548ce575b6e58b202bd76",
"https://git.kernel.org/stable/c/7c80f3a918ba9aa26fb699ee887064ec3af0396a",
"https://git.kernel.org/stable/c/826f84ab04a5cafe484ea9c2c85a3930068e5cb7",
"https://git.kernel.org/stable/c/a1008c8b9f357691ce6a8fdb8f157aecb2d79167",
"https://git.kernel.org/stable/c/a9ccd2ab1becf5dcb6d57e9fcd981f5eaa606c96",
"https://git.kernel.org/stable/c/acf0006f2b2b2ca672988875fd154429aafb2a9b",
"https://git.kernel.org/stable/c/d6afcab1b48f4051211c50145b9e91be3b1b42c9",
"https://git.kernel.org/stable/c/eea4c860c3b366369eff0489d94ee4f0571d467d",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50876.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-50876",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50876.json"
}
},
"related_cves": [
{
"value": "CVE-2022-50876",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 521800,
"published_at": "2025-12-30T12:23:16.79+00:00"
}