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

usb: gadget: composite: fix integer underflow in WebUSB GET_URL handling

The WebUSB GET_URL handler in composite_setup() narrows
landing_page_length to fit the host-supplied wLength using

landing_page_length = w_length
- WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH + landing_page_offset;

If wLength is smaller than WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH the
unsigned subtraction wraps, and the subsequent

memcpy(url_descriptor->URL,
cdev->landing_page + landing_page_offset,
landing_page_length - landing_page_offset);

ends up copying close to UINT_MAX bytes from cdev->landing_page into
cdev->req->buf. KASAN reports a slab-out-of-bounds in composite_setup
on the kmalloc-2k gadget_info allocation, and FORTIFY_SOURCE traps the
memcpy as a 4294967293-byte field-spanning write into
url_descriptor->URL (size 252).

A USB host can reach this from a single SETUP packet against any
gadget that has webusb/use=1 and a landingPage configured.

Handle the small-wLength case before the math: when the host requested
fewer bytes than the URL descriptor header, only the header is
meaningful and no URL bytes need to be copied. Setting
landing_page_length to landing_page_offset makes the existing memcpy a
no-op and leaves the descriptor returned to the host unchanged for all
larger wLength values.
Published: 2026-07-19
Score: 7.0 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel the WebUSB GET_URL handler performs an unsigned subtraction to calculate the size of a URL descriptor. If the host supplies a wLength value smaller than the descriptor header length, the subtraction underflows and wraps to a very large value. The subsequent memcpy then attempts to copy near UINT_MAX bytes into a fixed-size kernel buffer, causing an out‑of-bounds write that corrupts kernel memory. This memory corruption could allow an attacker to overwrite kernel structures and potentially execute arbitrary code with kernel privileges, constituting a CWE-787 out-of-bounds write.

Affected Systems

All Linux kernel builds that include the USB gadget subsystem with WebUSB support enabled (webusb/use=1) and a landingPage configured are affected. No explicit kernel version range is provided, so any installation that has the default WebUSB gadget configuration could be vulnerable until the patch is applied.

Risk and Exploitability

The EPSS score is below 1% and the vulnerability is not listed in CISA KEV, indicating a low current exploitation probability. The CVSS score of 7.0 indicates a moderate level of impact for a kernel memory corruption flaw. The likely attack vector requires a USB host that can send a crafted SETUP packet to the gadget; this could be achieved with physical access to a host or by compromising a host device that is able to communicate with the vulnerable gadget. The description indicates that a single packet is sufficient to trigger the bug, so the attack could be performed in an unattended or remote manner if the gadget is exposed to untrusted hosts.

Generated by OpenCVE AI on August 4, 2026 at 06:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the CVE-2026-63896 fix
  • If a kernel upgrade is not immediately possible, disable WebUSB by setting the gadget sysfs attribute to zero (e.g., echo 0 > /sys/class/udc/<device>/webusb/use) or remove the landingPage configuration
  • Reboot the system so the updated kernel image and USB subsystem are reinitialized

Generated by OpenCVE AI on August 4, 2026 at 06:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
History

Wed, 22 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-787
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Moderate


Sun, 19 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: usb: gadget: composite: fix integer underflow in WebUSB GET_URL handling The WebUSB GET_URL handler in composite_setup() narrows landing_page_length to fit the host-supplied wLength using landing_page_length = w_length - WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH + landing_page_offset; If wLength is smaller than WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH the unsigned subtraction wraps, and the subsequent memcpy(url_descriptor->URL, cdev->landing_page + landing_page_offset, landing_page_length - landing_page_offset); ends up copying close to UINT_MAX bytes from cdev->landing_page into cdev->req->buf. KASAN reports a slab-out-of-bounds in composite_setup on the kmalloc-2k gadget_info allocation, and FORTIFY_SOURCE traps the memcpy as a 4294967293-byte field-spanning write into url_descriptor->URL (size 252). A USB host can reach this from a single SETUP packet against any gadget that has webusb/use=1 and a landingPage configured. Handle the small-wLength case before the math: when the host requested fewer bytes than the URL descriptor header, only the header is meaningful and no URL bytes need to be copied. Setting landing_page_length to landing_page_offset makes the existing memcpy a no-op and leaves the descriptor returned to the host unchanged for all larger wLength values.
Title usb: gadget: composite: fix integer underflow in WebUSB GET_URL handling
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-19T14:55:06.152Z

Reserved: 2026-07-19T07:54:57.019Z

Link: CVE-2026-63896

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-63896 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T07:00:05Z

Weaknesses