CVE-2023-54022

Source
https://cve.org/CVERecord?id=CVE-2023-54022
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54022.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-54022
Downstream
Published
2025-12-24T10:55:52.045Z
Modified
2025-12-24T20:11:59.889890Z
Summary
ALSA: usb-audio: Fix potential memory leaks at error path for UMP open
Details

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 allocmidiurbs() that is called at MIDI 2.0 / UMP device are supposed to be handled at the caller side by invoking freemidiurbs(). However, freemidiurbs() loops only for ep->numurbs entries, and since ep->numentries wasn't updated yet at the allocation / init error in allocmidiurbs(), this entry won't be released.

The intention of freemidiurbs() 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 freemidiurbs() is missing at sndusbmidiv2open(). Although it'll be released later at reopen/close or disconnection, it's better to release immediately at the error path.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54022.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
ff49d1df79aef7580fe3ac99d17c3f886655d080
Fixed
f819b343aa95d24d5f7d6e06660c7f62591abc5f
Fixed
b1757fa30ef14f254f4719bf6f7d54a4c8207216

Affected versions

v6.*
v6.4
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.5.1
v6.5.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54022.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.5.0
Fixed
6.5.3

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54022.json"