{"id":"CVE-2026-31720","aliases":["CVE-2026-31720"],"related":[],"kind":"vulnerability","state":"published","title":"usb: gadget: f_uac1_legacy: validate control request size","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_uac1_legacy: validate control request size\n\nf_audio_complete() copies req->length bytes into a 4-byte stack\nvariable:\n\n  u32 data = 0;\n  memcpy(&data, req->buf, req->length);\n\nreq->length is derived from the host-controlled USB request path,\nwhich can lead to a stack out-of-bounds write.\n\nValidate req->actual against the expected payload size for the\nsupported control selectors and decode only the expected amount\nof data.\n\nThis avoids copying a host-influenced length into a fixed-size\nstack object.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_uac1_legacy: validate control request size\n\nf_audio_complete() copies req->length bytes into a 4-byte stack\nvariable:\n\n  u32 data = 0;\n  memcpy(&data, req->buf, req->length);\n\nreq->length is derived from the host-controlled USB request path,\nwhich can lead to a stack out-of-bounds write.\n\nValidate req->actual against the expected payload size for the\nsupported control selectors and decode only the expected amount\nof data.\n\nThis avoids copying a host-influenced length into a fixed-size\nstack object.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nusb: gadget: f_uac1_legacy: validar el tamaño de la solicitud de control\n\nf_audio_complete() copia bytes de req  ->  length en una variable de pila de 4 bytes:\n\nu32 data = 0;\nmemcpy(&data, req  ->  buf, req  ->  length);\n\nreq  ->  length se deriva de la ruta de solicitud USB controlada por el host, lo que puede llevar a una escritura fuera de límites de la pila.\n\nValidar req  ->  actual contra el tamaño de carga útil esperado para los selectores de control compatibles y decodificar solo la cantidad de datos esperada.\n\nEsto evita copiar una longitud influenciada por el host en un objeto de pila de tamaño fijo.","source":"nvd"}],"published":"2026-05-01T14:14:22.832Z","modified":"2026-11-11T21:10:00.200Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"c6994e6f067cf0fc4c6cca3d164018b1150916f8","fixed":"557d1d4e862eccd0b74cc377b66de3e1e8d49605","status":"affected"},{"type":"git","introduced":"c6994e6f067cf0fc4c6cca3d164018b1150916f8","fixed":"21b11e8581285c6f10ef43d05df349d445f24273","status":"affected"},{"type":"git","introduced":"c6994e6f067cf0fc4c6cca3d164018b1150916f8","fixed":"0d41772d98dcaf6c17e875b7d0ea0154ae1191ee","status":"affected"},{"type":"git","introduced":"c6994e6f067cf0fc4c6cca3d164018b1150916f8","fixed":"c6da4fed7537aec19880c24f6c3a95065adb1406","status":"affected"},{"type":"git","introduced":"c6994e6f067cf0fc4c6cca3d164018b1150916f8","fixed":"be2d32f0c3fe333d14c0a9ca90328dacbc3e06b8","status":"affected"},{"type":"git","introduced":"c6994e6f067cf0fc4c6cca3d164018b1150916f8","fixed":"8e5eb1d6e6a3d7bbea9c92132d0cda5793176426","status":"affected"},{"type":"git","introduced":"c6994e6f067cf0fc4c6cca3d164018b1150916f8","fixed":"26304d124e7f0383f8fe1168b5801a0ac7e16b1c","status":"affected"},{"type":"git","introduced":"c6994e6f067cf0fc4c6cca3d164018b1150916f8","fixed":"6e0e34d85cd46ceb37d16054e97a373a32770f6c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.31","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.31","status":"unaffected"},{"type":"semver","introduced":"5.10.253","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.203","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.168","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.134","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.81","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.22","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.12","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.31","fixed":"5.10.253"},{"status":"affected","introduced":"5.11","fixed":"5.15.203"},{"status":"affected","introduced":"5.16","fixed":"6.1.168"},{"status":"affected","introduced":"6.2","fixed":"6.6.134"},{"status":"affected","introduced":"6.7","fixed":"6.12.81"},{"status":"affected","introduced":"6.13","fixed":"6.18.22"},{"status":"affected","introduced":"6.19","fixed":"6.19.12"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/557d1d4e862eccd0b74cc377b66de3e1e8d49605","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/21b11e8581285c6f10ef43d05df349d445f24273","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0d41772d98dcaf6c17e875b7d0ea0154ae1191ee","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c6da4fed7537aec19880c24f6c3a95065adb1406","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/be2d32f0c3fe333d14c0a9ca90328dacbc3e06b8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8e5eb1d6e6a3d7bbea9c92132d0cda5793176426","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/26304d124e7f0383f8fe1168b5801a0ac7e16b1c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6e0e34d85cd46ceb37d16054e97a373a32770f6c","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31720","url":"https://www.cve.org/CVERecord?id=CVE-2026-31720","licence":"CVE Terms of Use","modified":"2026-05-11T22:14:27.286Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31720","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31720","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.350Z","epss":{"score":0.00137,"percentile":0.03316,"date":"2026-12-01T12:00:22.000Z"}}