{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-49545",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-02-26T02:08:31.590Z",
        "datePublished": "2025-02-26T02:13:58.363Z",
        "dateUpdated": "2026-08-05T08:55:37.233Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:55:37.233Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: usb-audio: Cancel pending work at closing a MIDI substream\n\nAt closing a USB MIDI output substream, there might be still a pending\nwork, which would eventually access the rawmidi runtime object that is\nbeing released.  For fixing the race, make sure to cancel the pending\nwork at closing."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - Triggered via local ALSA/OSS MIDI character devices (/dev/snd/midi*, /dev/sequencer) once a USB MIDI interface is bound; device presence is an environmental precondition, not a malicious-USB physical attack (same model as CVE-2024-44954 / CVE-2022-50719).\nAC:L - The attacker controls both sides of the race by writing MIDI data to queue snd_usbmidi_out_work and then closing/unsubscribing the substream to free the runtime, so success does not depend on external timing.\nPR:L - Only ordinary access to sound devices is required, which seat users get via udev uaccess ACLs or audio group membership; no CAP_SYS_ADMIN or root is needed.\nUI:N - The attacker opens the MIDI/sequencer device, writes to queue work, and closes it themselves; no separate victim action is required.\nS:U - The UAF and any resulting privilege escalation remain within the host kernel's security authority; this is not a VM escape or IOMMU/DMA boundary bypass.\nC:H - Use-after-free of the kmalloc-512 snd_rawmidi_runtime lets an attacker reclaim the object and steer subsequent reads in __snd_rawmidi_transmit_ack / transmit paths into attacker-controlled memory.\nI:H - The same reclaimable UAF is written (hw_ptr, avail, wake_up on runtime->sleep) from the workqueue path, enabling heap corruption and control-flow hijack primitives.\nA:H - Even without controlled reclaim, the pending work dereferencing the freed runtime reliably causes a KASAN-detected use-after-free / kernel oops, so Availability is High."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "sound/usb/midi.c"
                    ],
                    "versions": [
                        {
                            "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
                            "lessThan": "40bdb5ec957aca5c5c1924602bef6b0ab18e22d3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
                            "lessThan": "11868ca21585561659c2575b0d6508ef8e9c4291",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
                            "lessThan": "5e5fe2b6065541c6216a7a003b0cddf386be0d2d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
                            "lessThan": "517dcef4d2dda0132648f1e4c079ed17bba4d1a4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
                            "lessThan": "0125de38122f0f66bf61336158d12a1aabfe6425",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "sound/usb/midi.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.121",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.46",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.17.14",
                            "lessThanOrEqual": "5.17.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.18.3",
                            "lessThanOrEqual": "5.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.19",
                            "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": "2.6.12",
                                    "versionEndExcluding": "5.10.121"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.12",
                                    "versionEndExcluding": "5.15.46"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.12",
                                    "versionEndExcluding": "5.17.14"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.12",
                                    "versionEndExcluding": "5.18.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.12",
                                    "versionEndExcluding": "5.19"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/40bdb5ec957aca5c5c1924602bef6b0ab18e22d3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/11868ca21585561659c2575b0d6508ef8e9c4291"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5e5fe2b6065541c6216a7a003b0cddf386be0d2d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/517dcef4d2dda0132648f1e4c079ed17bba4d1a4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0125de38122f0f66bf61336158d12a1aabfe6425"
                }
            ],
            "title": "ALSA: usb-audio: Cancel pending work at closing a MIDI substream",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}