CVE-2023-54022

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

State
Published
Severity
Not scored
Published
Dec 24, 2025
Updated
May 11, 2026
Reserved
Dec 24, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • ff49d1df79aef7580fe3ac99d17c3f886655d080 to before f819b343aa95d24d5f7d6e06660c7f62591abc5fAffected
  • ff49d1df79aef7580fe3ac99d17c3f886655d080 to before b1757fa30ef14f254f4719bf6f7d54a4c8207216Affected
LinuxLinux
  • 6.5Affected
  • before 6.5Not affected
  • 6.5.3 through 6.5.*Not affected
  • 6.6 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.