usb: gadget: f_uac1_legacy: validate control request size
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_uac1_legacy: validate control request size f_audio_complete() copies req->length bytes into a 4-byte stack variable: u32 data = 0; memcpy(&data, req->buf, req->length); req->length is derived from the host-controlled USB request path, which can lead to a stack out-of-bounds write. Validate req->actual against the expected payload size for the supported control selectors and decode only the expected amount of data. This avoids copying a host-influenced length into a fixed-size stack object.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.253, 5.15.203, 6.1.168, 6.12.81, 6.18.22, 6.19.12, 6.6.134
- CVEs
- CVE-2026-31720
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 21:50 UTC · Revision 1
Source evidence
usb: gadget: f_uac1_legacy: validate control request size
core-osv · Original sourcePublished 1 May 2026, 14:14 UTC
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_uac1_legacy: validate control request size f_audio_complete() copies req->length bytes into a 4-byte stack variable: u32 data = 0; memcpy(&data, req->buf, req->length); req->length is derived from the host-controlled USB request path, which can lead to a stack out-of-bounds write. Validate req->actual against the expected payload size for the supported control selectors and decode only the expected amount of data. This avoids copying a host-influenced length into a fixed-size stack object.
osv:CVE-2026-31720
Kernel
Fixed versions: 5.10.253, 5.15.203, 6.1.168, 6.6.134, 6.12.81, 6.18.22, 6.19.12
Complete source record
{
"id": "e64bbdfdc1f81200beea3fadaad788cf1cb9ad57260d091bde05e81162b42356",
"url": "https://osv.dev/vulnerability/CVE-2026-31720",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "usb: gadget: f_uac1_legacy: validate control request size",
"summary": "In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_uac1_legacy: validate control request size f_audio_complete() copies req->length bytes into a 4-byte stack variable: u32 data = 0; memcpy(&data, req->buf, req->length); req->length is derived from the host-controlled USB request path, which can lead to a stack out-of-bounds write. Validate req->actual against the expected payload size for the supported control selectors and decode only the expected amount of data. This avoids copying a host-influenced length into a fixed-size stack object.",
"evidence": "osv:CVE-2026-31720",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.253",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.203",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.168",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.134",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.81",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.22",
"evidence": "/affected/1/ranges"
},
{
"value": "6.19.12",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-31720",
"aliases": [
"CVE-2026-31720"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "c6994e6f067cf0fc4c6cca3d164018b1150916f8"
},
{
"fixed": "557d1d4e862eccd0b74cc377b66de3e1e8d49605"
},
{
"fixed": "21b11e8581285c6f10ef43d05df349d445f24273"
},
{
"fixed": "0d41772d98dcaf6c17e875b7d0ea0154ae1191ee"
},
{
"fixed": "c6da4fed7537aec19880c24f6c3a95065adb1406"
},
{
"fixed": "be2d32f0c3fe333d14c0a9ca90328dacbc3e06b8"
},
{
"fixed": "8e5eb1d6e6a3d7bbea9c92132d0cda5793176426"
},
{
"fixed": "26304d124e7f0383f8fe1168b5801a0ac7e16b1c"
},
{
"fixed": "6e0e34d85cd46ceb37d16054e97a373a32770f6c"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31720.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.6.31"
},
{
"fixed": "5.10.253"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.203"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.168"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.134"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.81"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.22"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "6.19.12"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31720.json"
}
}
],
"modified": "2026-10-28T02:30:24.264067121Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/0d41772d98dcaf6c17e875b7d0ea0154ae1191ee",
"https://git.kernel.org/stable/c/21b11e8581285c6f10ef43d05df349d445f24273",
"https://git.kernel.org/stable/c/26304d124e7f0383f8fe1168b5801a0ac7e16b1c",
"https://git.kernel.org/stable/c/557d1d4e862eccd0b74cc377b66de3e1e8d49605",
"https://git.kernel.org/stable/c/6e0e34d85cd46ceb37d16054e97a373a32770f6c",
"https://git.kernel.org/stable/c/8e5eb1d6e6a3d7bbea9c92132d0cda5793176426",
"https://git.kernel.org/stable/c/be2d32f0c3fe333d14c0a9ca90328dacbc3e06b8",
"https://git.kernel.org/stable/c/c6da4fed7537aec19880c24f6c3a95065adb1406",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31720.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-31720",
"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/2026/31xxx/CVE-2026-31720.json"
}
},
"related_cves": [
{
"value": "CVE-2026-31720",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 490350,
"published_at": "2026-05-01T14:14:22.832+00:00"
}