{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-142986",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.341Z",
        "datePublished": "2026-12-03T09:17:17.548Z",
        "dateUpdated": "2026-12-03T09:17:17.548Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-03T09:17:17.548Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_midi: fix UAF race during IN request handling\n\nf_midi_disable() drains and frees pre-allocated IN requests from\nin_req_fifo without holding midi->transmit_lock. If f_midi_transmit()\nruns concurrently on the workqueue, f_midi_do_transmit() can peek a\nrequest from in_req_fifo and write into its buffer while\nf_midi_disable() frees it, leading to a use-after-free.\n\nAdditionally, when usb_ep_queue() fails in f_midi_do_transmit() (such\nas with -ESHUTDOWN when the endpoint is disabled concurrently), it\nresets req->length = 0 and returns active instead of the error code,\ncausing the do-while loop in f_midi_transmit() to keep spinning under\nmidi->transmit_lock until the substream is drained.\n\nFix this by acquiring midi->transmit_lock in f_midi_disable() while\nreleasing IN requests from in_req_fifo, and returning the error code\nfrom f_midi_do_transmit() when usb_ep_queue() fails so f_midi_transmit()\naborts immediately and drops active substreams."
                }
            ],
            "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_midi.c"
                    ],
                    "versions": [
                        {
                            "version": "e1e3d7ec5da32af3bded733a61c248d7db0b4e34",
                            "lessThan": "e43bc0f68b596a20fe7d4b65231e7d27192d5bb5",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e1e3d7ec5da32af3bded733a61c248d7db0b4e34",
                            "lessThan": "d5e34684b1cdf9635f5c73e1c8ca02c886a81796",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e1e3d7ec5da32af3bded733a61c248d7db0b4e34",
                            "lessThan": "bf132239a705c7d3672c3d7086ac911bac23ebf4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e1e3d7ec5da32af3bded733a61c248d7db0b4e34",
                            "lessThan": "41b3f72bc94c7701c322fe7c390edd7d2ec1ee38",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e1e3d7ec5da32af3bded733a61c248d7db0b4e34",
                            "lessThan": "dc15fd316ac860b6904689941bb14527554e8a96",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e1e3d7ec5da32af3bded733a61c248d7db0b4e34",
                            "lessThan": "78a8d6537f1de34770e460edee360b556ef40427",
                            "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_midi.c"
                    ],
                    "versions": [
                        {
                            "version": "4.5",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.5",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.276",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.227",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.120",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.66",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.7",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc4",
                            "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": "4.5",
                                    "versionEndExcluding": "5.10.276"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.5",
                                    "versionEndExcluding": "5.15.227"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.5",
                                    "versionEndExcluding": "6.12.120"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.5",
                                    "versionEndExcluding": "6.18.66"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.5",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.5",
                                    "versionEndExcluding": "7.4-rc4"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/e43bc0f68b596a20fe7d4b65231e7d27192d5bb5"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d5e34684b1cdf9635f5c73e1c8ca02c886a81796"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bf132239a705c7d3672c3d7086ac911bac23ebf4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/41b3f72bc94c7701c322fe7c390edd7d2ec1ee38"
                },
                {
                    "url": "https://git.kernel.org/stable/c/dc15fd316ac860b6904689941bb14527554e8a96"
                },
                {
                    "url": "https://git.kernel.org/stable/c/78a8d6537f1de34770e460edee360b556ef40427"
                }
            ],
            "title": "usb: gadget: f_midi: fix UAF race during IN request handling",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}