usb: gadget: configfs: Fix OOB read on empty string write
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 87213d388e927aaa88b21d5ff7e1f75ca2288da1 · < 783ea37b237a9b524f1e5ca018ea17d772ee0ea0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: configfs: Fix OOB read on empty string write
When writing an empty string to either 'qw_sign' or 'landingPage' sysfs attributes, the store functions attempt to access page[l - 1] before validating that the length 'l' is greater than zero.
This patch fixes the vulnerability by adding a check at the beginning of os_desc_qw_sign_store() and webusb_landingPage_store() to handle the zero-length input case gracefully by returning immediately.
From the CVE record · Linux
The Linux kernel USB gadget configfs code reads outside the input buffer when an empty string is written to the qw_sign or landingPage sysfs attribute. An attacker who can write to either attribute locally can trigger the read; the input does not specify authentication requirements or any further user interaction.
Engineers running Linux kernels with USB gadget configfs should check their deployments; affected versions are not specified.