In the Linux kernel, the following vulnerability has been resolved:
media: pvrusb2: fix memory leak in pvr_probe
The error handling code in pvr2hdwcreate forgets to unregister the v4l2 device. When pvr2hdwcreate returns back to pvr2contextcreate, it calls pvr2contextdestroy to destroy context, but mp->hdw is NULL, which leads to that pvr2hdwdestroy directly returns.
Fix this by adding v4l2deviceunregister to decrease the refcount of usb interface.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49982.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49982.json"
[
{
"signature_type": "Function",
"id": "CVE-2022-49982-3bac3cda",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ba7dd8a9686a61a34b3a7b922ce721378d4740d0",
"target": {
"function": "pvr2_hdw_create",
"file": "drivers/media/usb/pvrusb2/pvrusb2-hdw.c"
},
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "315613642583703172315369745531949206160",
"length": 8618.0
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ba7dd8a9686a61a34b3a7b922ce721378d4740d0",
"target": {
"file": "drivers/media/usb/pvrusb2/pvrusb2-hdw.c"
},
"id": "CVE-2022-49982-3c6cc872",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268169711854888202124059838727796290998",
"311422414379750561120688475183275938759",
"234683067197324694684004141757755532619",
"212297076409905930449592767120693323105"
]
}
}
]