{"id":"CVE-2026-139007","summary":"usb: fotg210: validate endpoint index in ep0 handlers","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: fotg210: validate endpoint index in ep0 handlers\n\nfotg210_set_feature(), fotg210_clear_feature() and fotg210_get_status()\nuse wIndex from the USB setup packet to index the fotg210-\u003eep[] array\nwithout verifying that the endpoint number falls below\nFOTG210_MAX_NUM_EP (5).  USB_ENDPOINT_NUMBER_MASK is 0x0f, so a\nmalicious host can issue a setup packet with wIndex 5..15, resulting in\nan out-of-bounds array read.  The resulting wild pointer is then\ndereferenced in fotg210_set_epnstall() or fotg210_is_epnstall(), which\ncompute an MMIO register offset from ep-\u003eepnum and perform iowrite32\nthrough it.\n\nfotg210_clear_feature() is especially problematic: the out-of-bounds\naccess occurs at function entry (source-level) regardless of which\nUSB_RECIP_* case is taken, because the ep pointer is computed before the\nswitch statement.\n\nAdd upper-bound checks on the endpoint number derived from wIndex in\nall three functions.  Invalid endpoint numbers in clear_feature now\ntrigger fotg210_request_error() (STALL) instead of silently falling\nthrough to fotg210_set_cxdone().  Also add the missing le16_to_cpu()\nconversion for ctrl-\u003ewIndex in fotg210_get_status() to fix a sparse\nendianness warning.","modified":"2026-12-01T21:02:35.739644994Z","published":"2026-11-30T13:27:00.630Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139007.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0d9e9643b93d6f6f8c2b4bb07037815de7065411"},{"type":"WEB","url":"https://git.kernel.org/stable/c/22eeb045f9394d5184df302190deea902104f394"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4bee213dd4ade93aa502cd83d0eb4b78055027c5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7b5980b6206dfbb4369bd0f94f3ed3957445072c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7df7ffc21c898148afc91df7d90b6316fbdc3b7c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/90140d30ee7bbd5e7c2e9e0d685c72991598c58b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ae4977c1a0fb9200ff4dd19e0a13d55f00720fda"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bbddb219b00af0792242a0ad1dc7fb3344f38733"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139007.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139007"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b84a8dee23fd41600a8aebcba1410b5bb5b3bdeb"},{"fixed":"ae4977c1a0fb9200ff4dd19e0a13d55f00720fda"},{"fixed":"22eeb045f9394d5184df302190deea902104f394"},{"fixed":"7df7ffc21c898148afc91df7d90b6316fbdc3b7c"},{"fixed":"4bee213dd4ade93aa502cd83d0eb4b78055027c5"},{"fixed":"7b5980b6206dfbb4369bd0f94f3ed3957445072c"},{"fixed":"0d9e9643b93d6f6f8c2b4bb07037815de7065411"},{"fixed":"90140d30ee7bbd5e7c2e9e0d685c72991598c58b"},{"fixed":"bbddb219b00af0792242a0ad1dc7fb3344f38733"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139007.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.11.0"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139007.json"}}],"schema_version":"1.9.2"}