{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-98770",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-09-25T10:25:14.369Z",
        "datePublished": "2026-10-18T15:48:06.586Z",
        "dateUpdated": "2026-10-21T12:56:45.210Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-10-21T12:56:45.210Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/usb/gadget/function/f_midi2.c"
                    ],
                    "versions": [
                        {
                            "version": "856fa444b0982746f95e801bab0e586533eb29a3",
                            "lessThan": "18138d9f19cf6944ff09f5c8c0930545036fe3d0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "856fa444b0982746f95e801bab0e586533eb29a3",
                            "lessThan": "8294ff75a9de23f7cc641e5e5ca31fa6ea72a574",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "856fa444b0982746f95e801bab0e586533eb29a3",
                            "lessThan": "87f2185423e01f113811301878f2f67eccec960d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "856fa444b0982746f95e801bab0e586533eb29a3",
                            "lessThan": "223c3bd02a582776d8ee47dae7b69d3258420694",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "856fa444b0982746f95e801bab0e586533eb29a3",
                            "lessThan": "310c2d4608d8c1a2baa57db1dfd319c5c40cf4a1",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/usb/gadget/function/f_midi2.c"
                    ],
                    "versions": [
                        {
                            "version": "6.6",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.6",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.160",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.113",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.56",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.2.10",
                            "lessThanOrEqual": "7.2.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.6.160"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.12.113"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.18.56"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "7.2.10"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "7.3"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/18138d9f19cf6944ff09f5c8c0930545036fe3d0"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8294ff75a9de23f7cc641e5e5ca31fa6ea72a574"
                },
                {
                    "url": "https://git.kernel.org/stable/c/87f2185423e01f113811301878f2f67eccec960d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/223c3bd02a582776d8ee47dae7b69d3258420694"
                },
                {
                    "url": "https://git.kernel.org/stable/c/310c2d4608d8c1a2baa57db1dfd319c5c40cf4a1"
                }
            ],
            "title": "usb: gadget: midi2: Fix the jack descriptor array sizes",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}