usb: fotg210: validate endpoint index in ep0 handlers
- State
- Published
- Severity
- Not Scored
- Published
- Nov 30, 2026
- Updated
- Nov 30, 2026
- Reserved
- Nov 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
usb: fotg210: validate endpoint index in ep0 handlers
fotg210_set_feature(), fotg210_clear_feature() and fotg210_get_status() use wIndex from the USB setup packet to index the fotg210->ep[] array without verifying that the endpoint number falls below FOTG210_MAX_NUM_EP (5). USB_ENDPOINT_NUMBER_MASK is 0x0f, so a malicious host can issue a setup packet with wIndex 5..15, resulting in an out-of-bounds array read. The resulting wild pointer is then dereferenced in fotg210_set_epnstall() or fotg210_is_epnstall(), which compute an MMIO register offset from ep->epnum and perform iowrite32 through it.
fotg210_clear_feature() is especially problematic: the out-of-bounds access occurs at function entry (source-level) regardless of which USB_RECIP_* case is taken, because the ep pointer is computed before the switch statement.
Add upper-bound checks on the endpoint number derived from wIndex in all three functions. Invalid endpoint numbers in clear_feature now trigger fotg210_request_error() (STALL) instead of silently falling through to fotg210_set_cxdone(). Also add the missing le16_to_cpu() conversion for ctrl->wIndex in fotg210_get_status() to fix a sparse endianness warning.
| Product | Versions |
|---|---|
| Linux Linux | b84a8dee23fd41600a8aebcba1410b5bb5b3bdeb to before ae4977c1a0fb9200ff4dd19e0a13d55f00720fda Affectedb84a8dee23fd41600a8aebcba1410b5bb5b3bdeb to before 22eeb045f9394d5184df302190deea902104f394 Affectedb84a8dee23fd41600a8aebcba1410b5bb5b3bdeb to before 7df7ffc21c898148afc91df7d90b6316fbdc3b7c Affectedb84a8dee23fd41600a8aebcba1410b5bb5b3bdeb to before 4bee213dd4ade93aa502cd83d0eb4b78055027c5 Affectedb84a8dee23fd41600a8aebcba1410b5bb5b3bdeb to before 7b5980b6206dfbb4369bd0f94f3ed3957445072c Affectedb84a8dee23fd41600a8aebcba1410b5bb5b3bdeb to before 0d9e9643b93d6f6f8c2b4bb07037815de7065411 Affectedb84a8dee23fd41600a8aebcba1410b5bb5b3bdeb to before 90140d30ee7bbd5e7c2e9e0d685c72991598c58b Affectedb84a8dee23fd41600a8aebcba1410b5bb5b3bdeb to before bbddb219b00af0792242a0ad1dc7fb3344f38733 Affected |
| Linux Linux | 3.11 Affectedbefore 3.11 Not Affected5.10.275 through 5.10.* Not Affected5.15.226 through 5.15.* Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.117 through 6.12.* Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected |
The record has no CVSS score.
Weaknesses
The record names no weakness.
References
- https://git.kernel.org/stable/c/ae4977c1a0fb9200ff4dd19e0a13d55f00720fda
- https://git.kernel.org/stable/c/22eeb045f9394d5184df302190deea902104f394
- https://git.kernel.org/stable/c/7df7ffc21c898148afc91df7d90b6316fbdc3b7c
- https://git.kernel.org/stable/c/4bee213dd4ade93aa502cd83d0eb4b78055027c5
- https://git.kernel.org/stable/c/7b5980b6206dfbb4369bd0f94f3ed3957445072c
- https://git.kernel.org/stable/c/0d9e9643b93d6f6f8c2b4bb07037815de7065411
- https://git.kernel.org/stable/c/90140d30ee7bbd5e7c2e9e0d685c72991598c58b
- https://git.kernel.org/stable/c/bbddb219b00af0792242a0ad1dc7fb3344f38733
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.