ALSA: usb-audio: Fix potential memory leaks (Linux Linux)

CVE-2022-50484
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.16 % · percentile 6 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Analyzed

Description

In the Linux kernel, the following vulnerability has been resolved: ALSA: usb-audio: Fix potential memory leaks When the driver hits -ENOMEM at allocating a URB or a buffer, it aborts and goes to the error path that releases the all previously allocated resources. However, when -ENOMEM hits at the middle of the sync EP URB allocation loop, the partially allocated URBs might be left without released, because ep->nurbs is still zero at that point. Fix it by setting ep->nurbs at first, so that the error handler loops over the full URB list.

Weaknesses (CWE)

  • CWE-401 — Missing Release of Memory after Effective Lifetime

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected 8fdff6a319e7dac757c558bd283dc4577e68cde7 < 0604e5e5537af099ea2f6dfd892afe5c92db8a80 ; affected 8fdff6a319e7dac757c558bd283dc4577e68cde7 < 28d8d267af5d73f91d7640cbdb4024703256e36c ; affected 8fdff6a319e7dac757c558bd283dc4577e68cde7 < 46f0aed47673e275d682af60ed26dcc28add8eae ; affected 8fdff6a319e7dac757c558bd283dc4577e68cde7 < 988ec0cd0a2643c25c1658f7c33de2e15a5a2e31 ; affected 8fdff6a319e7dac757c558bd283dc4577e68cde7 < bc1d16d282bca421c6fc31de4b8fd412010f01bd ; affected 8fdff6a319e7dac757c558bd283dc4577e68cde7 < 0672215994e2347a9b4f145e2bc1709b1e01cee3
Linux · Linuxaffected 3.5 ; unaffected 0 < 3.5 ; unaffected 4.9.331 ≤ 4.9.* ; unaffected 4.14.296 ≤ 4.14.* ; unaffected 4.19.262 ≤ 4.19.* ; unaffected 5.4.220 ≤ 5.4.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD