# CVE-2023-54022: ALSA: usb-audio: Fix potential memory leaks at error path for UMP open

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 8% of CVEs (2026-12-01)
- Published: 2025-12-24T10:55:52.045Z
- Modified: 2026-06-17T06:46:33.313Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

ALSA: usb-audio: Fix potential memory leaks at error path for UMP open

The allocation and initialization errors at alloc_midi_urbs() that is
called at MIDI 2.0 / UMP device are supposed to be handled at the
caller side by invoking free_midi_urbs().  However, free_midi_urbs()
loops only for ep->num_urbs entries, and since ep->num_entries wasn't
updated yet at the allocation / init error in alloc_midi_urbs(), this
entry won't be released.

The intention of free_midi_urbs() is to release the whole elements, so
change the loop size to NUM_URBS to scan over all elements for fixing
the missed releases.

Also, the call of free_midi_urbs() is missing at
snd_usb_midi_v2_open().  Although it'll be released later at
reopen/close or disconnection, it's better to release immediately at
the error path.

(As written by CVE List.)

## Affected

- Linux Linux: from ff49d1df79aef7580fe3ac99d17c3f886655d080 before f819b343aa95d24d5f7d6e06660c7f62591abc5f; from ff49d1df79aef7580fe3ac99d17c3f886655d080 before b1757fa30ef14f254f4719bf6f7d54a4c8207216; 6.5 (not affected: before 6.5; from 6.5.3 up to 6.5.*; from 6.6 up to *)

## References

- <https://git.kernel.org/stable/c/f819b343aa95d24d5f7d6e06660c7f62591abc5f>
- <https://git.kernel.org/stable/c/b1757fa30ef14f254f4719bf6f7d54a4c8207216>

## Sources

- CVE List: [CVE-2023-54022](https://www.cve.org/CVERecord?id=CVE-2023-54022), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-54022](https://nvd.nist.gov/vuln/detail/CVE-2023-54022), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-54022 · Whole record: https://cve.day/CVE-2023-54022.json · Rebuilt by cve.day 2026-11-25T22:58:35.145Z
