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.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50484.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50484.json"
[
{
"signature_type": "Line",
"id": "CVE-2022-50484-ab6bd466",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@28d8d267af5d73f91d7640cbdb4024703256e36c",
"signature_version": "v1",
"target": {
"file": "sound/usb/endpoint.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"85474043097180736319407998329052934427",
"15932979814912768319328341219373372857",
"142831384626653916608107235666639625037",
"277866348537149821618018232898901117752",
"141042831769447727442225012564261182178",
"193080502480411404200534390194979345557",
"110789546695873416199686536630129039881"
]
}
},
{
"signature_type": "Function",
"target": {
"function": "sync_ep_set_params",
"file": "sound/usb/endpoint.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@28d8d267af5d73f91d7640cbdb4024703256e36c",
"id": "CVE-2022-50484-de385415",
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "179296222650039646989283112820368705843",
"length": 962.0
}
}
]