{"id":"CVE-2026-63896","aliases":["CVE-2026-63896"],"related":[],"kind":"vulnerability","state":"published","title":"usb: gadget: composite: fix integer underflow in WebUSB GET_URL handling","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: composite: fix integer underflow in WebUSB GET_URL handling\n\nThe WebUSB GET_URL handler in composite_setup() narrows\nlanding_page_length to fit the host-supplied wLength using\n\n\tlanding_page_length = w_length\n\t\t- WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH + landing_page_offset;\n\nIf wLength is smaller than WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH the\nunsigned subtraction wraps, and the subsequent\n\n\tmemcpy(url_descriptor->URL,\n\t       cdev->landing_page + landing_page_offset,\n\t       landing_page_length - landing_page_offset);\n\nends up copying close to UINT_MAX bytes from cdev->landing_page into\ncdev->req->buf.  KASAN reports a slab-out-of-bounds in composite_setup\non the kmalloc-2k gadget_info allocation, and FORTIFY_SOURCE traps the\nmemcpy as a 4294967293-byte field-spanning write into\nurl_descriptor->URL (size 252).\n\nA USB host can reach this from a single SETUP packet against any\ngadget that has webusb/use=1 and a landingPage configured.\n\nHandle the small-wLength case before the math: when the host requested\nfewer bytes than the URL descriptor header, only the header is\nmeaningful and no URL bytes need to be copied.  Setting\nlanding_page_length to landing_page_offset makes the existing memcpy a\nno-op and leaves the descriptor returned to the host unchanged for all\nlarger wLength values.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: composite: fix integer underflow in WebUSB GET_URL handling\n\nThe WebUSB GET_URL handler in composite_setup() narrows\nlanding_page_length to fit the host-supplied wLength using\n\n\tlanding_page_length = w_length\n\t\t- WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH + landing_page_offset;\n\nIf wLength is smaller than WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH the\nunsigned subtraction wraps, and the subsequent\n\n\tmemcpy(url_descriptor->URL,\n\t       cdev->landing_page + landing_page_offset,\n\t       landing_page_length - landing_page_offset);\n\nends up copying close to UINT_MAX bytes from cdev->landing_page into\ncdev->req->buf.  KASAN reports a slab-out-of-bounds in composite_setup\non the kmalloc-2k gadget_info allocation, and FORTIFY_SOURCE traps the\nmemcpy as a 4294967293-byte field-spanning write into\nurl_descriptor->URL (size 252).\n\nA USB host can reach this from a single SETUP packet against any\ngadget that has webusb/use=1 and a landingPage configured.\n\nHandle the small-wLength case before the math: when the host requested\nfewer bytes than the URL descriptor header, only the header is\nmeaningful and no URL bytes need to be copied.  Setting\nlanding_page_length to landing_page_offset makes the existing memcpy a\nno-op and leaves the descriptor returned to the host unchanged for all\nlarger wLength values.","source":"cvelist"}],"published":"2026-07-19T14:55:06.152Z","modified":"2026-11-12T15:02:22.670Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"type":"git","introduced":"93c473948c588978cd55d9a3adad8b3e8057aa21","fixed":"046870ff6b6f7b743c953c061043a9b30700d491","status":"affected"},{"type":"git","introduced":"93c473948c588978cd55d9a3adad8b3e8057aa21","fixed":"f5869dfaa89854dcf34121036294d42d6c7acb8f","status":"affected"},{"type":"git","introduced":"93c473948c588978cd55d9a3adad8b3e8057aa21","fixed":"f8f5a8f48c7cae3fac85e04b593bd47939f9725f","status":"affected"},{"type":"git","introduced":"93c473948c588978cd55d9a3adad8b3e8057aa21","fixed":"a20f0ccf45708af6e063c7234c215d364b00de25","status":"affected"},{"type":"git","introduced":"93c473948c588978cd55d9a3adad8b3e8057aa21","fixed":"6c5dbc104dadd79fc2923497c20bae759a18758c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.3","status":"unaffected"},{"type":"semver","introduced":"6.6.143","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.93","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.35","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.12","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","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":"6.3","fixed":"6.6.143"},{"status":"affected","introduced":"6.7","fixed":"6.12.93"},{"status":"affected","introduced":"6.13","fixed":"6.18.35"},{"status":"affected","introduced":"6.19","fixed":"7.0.12"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/046870ff6b6f7b743c953c061043a9b30700d491","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f5869dfaa89854dcf34121036294d42d6c7acb8f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f8f5a8f48c7cae3fac85e04b593bd47939f9725f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a20f0ccf45708af6e063c7234c215d364b00de25","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6c5dbc104dadd79fc2923497c20bae759a18758c","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-63896","url":"https://www.cve.org/CVERecord?id=CVE-2026-63896","licence":"CVE Terms of Use","modified":"2026-07-19T14:55:06.152Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-63896","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63896","licence":"Public domain","modified":"2026-11-12T15:02:22.670Z"}],"updatedAt":"2026-11-25T22:59:28.805Z","epss":{"score":0.00166,"percentile":0.06165,"date":"2026-12-01T12:00:22.000Z"}}