{"id":"CVE-2026-98770","kind":"vulnerability","aliases":["CVE-2026-98770"],"related":[],"title":"Linux kernel USB MIDI gadget: jack descriptor arrays too small, out-of-bounds write","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: midi2: Fix the jack descriptor array sizes\n\nThe jack in/out descriptor arrays in struct f_midi2_usb_config have\nthe size of MAX_CABLES, which look reasonable -- but it turned out to\nbe incorrect.  Namely, the entries for those arrays are added from\nboth inputs and outputs, hence for each loop cycle, it adds two, ended\nup with as twice as the expected size.  This inconsistency may result\nin potential OOB when a large number of jacks are set up via configfs,\nalthough the max number of cables (the loop count) is limited to\nMAX_CABLES.\n\nFor addressing it, correct the jack_ins & jack_outs array sizes to\ntwice, MAX_CABLES * 2.","summary":"The Linux kernel's USB MIDI 2.0 gadget driver sized its jack in/out descriptor arrays at MAX_CABLES, but each loop iteration adds two entries, so the arrays overflow when many jacks are configured through configfs. The fix doubles the array sizes to MAX_CABLES * 2; the sources do not state the attacker-controlled impact beyond the out-of-bounds write.","severity":"unknown","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["embedded","linux-kernel","runtime","usb-gadget"],"not_affected_if":["no-usb-gadget-midi2"],"how_to_check":"- unknown","fix":"- Update the Linux kernel to a release that includes the upstream commit fixing the midi2 jack descriptor array sizes (the sources do not list version numbers).","status":"open","published_at":"2026-10-18T16:17:30+00:00","first_seen_at":"2026-10-23T21:57:16+00:00","triaged_at":"2026-10-25T05:15:31+00:00","updated_at":"2026-10-25T05:15:31+00:00","category":"runtime","confidence":0.5,"triage":{"at":"2026-10-25T05:15:31Z","model":"claude-haiku-5-5","output":{"fix":"- Update the Linux kernel to a release that includes the upstream commit fixing the midi2 jack descriptor array sizes (the sources do not list version numbers).","reach":"local","title":"Linux kernel USB MIDI gadget: jack descriptor arrays too small, out-of-bounds write","impact":"medium","summary":"The Linux kernel's USB MIDI 2.0 gadget driver sized its jack in/out descriptor arrays at MAX_CABLES, but each loop iteration adds two entries, so the arrays overflow when many jacks are configured through configfs. The fix doubles the array sizes to MAX_CABLES * 2; the sources do not state the attacker-controlled impact beyond the out-of-bounds write.","category":"runtime","nicknames":[],"who_cares":["linux-kernel","usb-gadget","embedded"],"confidence":0.5,"needs_auth":"unknown","worst_case":"out-of-bounds memory write in the kernel, impact not stated","analyst_note":"Check the NVD and kernel.org stable commit for the fixed kernel versions, the exact impact, and whether configfs access is required.","how_to_check":"- unknown","needs_analyst":true,"not_affected_if":["no-usb-gadget-midi2"],"who_is_affected":"Systems running a Linux kernel with the USB MIDI 2.0 gadget function (f_midi2) built in or loaded, where USB MIDI jacks are configured through configfs. Systems that do not use USB gadget MIDI 2.0 are unlikely to be exposed, but the sources do not confirm this.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000643,"input_tokens":3483,"output_tokens":589,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-2026':17A,20A '-98770':18A,21A '2':75B,216C '2.0':36B 'add':52B,146C,158C 'address':202C 'although':187C 'array':8A,44B,57B,70B,110C,116C,144C,210C 'attack':83B 'attacker-control':82B 'beyond':86B 'bound':14A,91B 'cabl':47B,74B,128C,192C,200C,215C 'config':122C 'configf':65B,186C 'configur':63B 'control':84B 'correct':204C 'count':195C 'cve':16A,19A 'cycl':156C 'descriptor':7A,43B,109C,115C 'doubl':68B 'driver':38B 'embed':22B 'end':160C 'entri':54B,141C 'expect':167C 'f':119C 'fix':67B,106C 'follow':98C 'gadget':5A,29B,37B,104C 'henc':152C 'impact':85B 'in':207C 'in/out':42B,114C 'inconsist':170C 'incorrect':138C 'input':149C 'iter':51B 'jack':6A,41B,61B,108C,113C,181C,206C,208C 'kernel':2A,25B,32B,96C 'larg':178C 'limit':197C 'linux':1A,24B,31B,95C 'linux-kernel':23B 'look':130C 'loop':50B,155C,194C 'mani':60B 'max':46B,73B,127C,189C,199C,214C 'may':171C 'midi':4A,35B 'midi2':105C,120C 'name':139C 'number':179C,190C 'oob':175C 'out':209C 'out-of-bound':11A,88B 'output':151C 'overflow':58B 'potenti':174C 'reason':131C 'resolv':102C 'result':172C 'runtim':26B 'set':183C 'size':39B,71B,111C,125C,168C,211C 'small':10A 'sourc':77B 'state':80B 'struct':118C 'turn':134C 'twice':164C,213C 'two':53B,159C 'usb':3A,28B,34B,103C,121C 'usb-gadget':27B 'via':185C 'vulner':99C 'write':15A,92B","nicknames":[],"mitigations":[],"who_affected":"Systems running a Linux kernel with the USB MIDI 2.0 gadget function (f_midi2) built in or loaded, where USB MIDI jacks are configured through configfs. Systems that do not use USB gadget MIDI 2.0 are unlikely to be exposed, but the sources do not confirm this.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-18T16:17:30+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-98770","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98770","severity":null,"published_at":"2026-10-18T16:17:30+00:00","modified_at":"2026-10-21T13:21:45+00:00","first_seen_at":"2026-10-23T21:57:16+00:00","fetched_at":"2026-10-23T22:28:56+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}