In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8712: fix a potential memory leak in r871xudrvinit()
In r871xudrvinit(), if r8712initdrvsw() fails, then the memory allocated by r8712allocioqueue() in r8712usbdvobjinit() is not properly released as there is no action will be performed by r8712usbdvobjdeinit(). To properly release it, we should call r8712freeioqueue() in r8712usbdvobjdeinit().
Besides, in r871xudevremove(), r8712usbdvobjdeinit() will be called
by r871xdevunload() under condition padapter->bup and
r8712freeioqueue() is called by r8712freedrvsw().
However, r8712usbdvobjdeinit() does not rely on padapter->bup and
calling r8712freeioqueue() in r8712freedrvsw() is negative for
better understading the code.
So I move r8712usbdvobjdeinit() into r871xudevremove(), and remove
r8712freeioqueue() from r8712freedrv_sw().
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49312.json"
}[
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5a89a92efc342dd7c44b6056da87debc598f9c73",
"deprecated": false,
"target": {
"function": "r8712_free_drv_sw",
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-02a4d3fb",
"digest": {
"function_hash": "328141364447425612405611816703367450725",
"length": 306.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2882b8baad068d21c99fb2ab5a85a2bdbd5b834",
"deprecated": false,
"target": {
"function": "r871xu_dev_remove",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-0398f05f",
"digest": {
"function_hash": "249712165882066939466196005927966215985",
"length": 586.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8eb42d6d10f8fe509117859defddf9e72b4fa4d0",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-1267c243",
"digest": {
"line_hashes": [
"11454000843227603145422226803453866583",
"198139507487915063875564393192799477126",
"92634571631991620270363136337402668854",
"217289726663555589233307361931536959517"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7288ff561de650d4139fab80e9cb0da9b5b32434",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-17359d52",
"digest": {
"line_hashes": [
"216881989835896042385092986034245485204",
"309900353203788951896127709394628401469",
"66238712593917009143560462746059245225",
"10896270985457156893880161390845867258",
"199033864222432391319303386249230199163",
"65654631104413068872874389286694974191",
"28806550789021141268823946377896017758",
"36044492515384129272363757583181011872",
"182011850806433237349179685398246577412",
"54771284738687596767868736978723710327",
"230661934804597152949172153061130900341",
"205929245827933323559272730727857702211",
"49739314098222879734032015919266328751"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5a89a92efc342dd7c44b6056da87debc598f9c73",
"deprecated": false,
"target": {
"function": "r8712_usb_dvobj_deinit",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-1f136de4",
"digest": {
"function_hash": "294323057906760878418382000322794272363",
"length": 43.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5a89a92efc342dd7c44b6056da87debc598f9c73",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-2af6bd74",
"digest": {
"line_hashes": [
"11454000843227603145422226803453866583",
"198139507487915063875564393192799477126",
"92634571631991620270363136337402668854",
"217289726663555589233307361931536959517"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5a89a92efc342dd7c44b6056da87debc598f9c73",
"deprecated": false,
"target": {
"function": "r871x_dev_unload",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-3606b54b",
"digest": {
"function_hash": "149901254257519306938334437111310165268",
"length": 318.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8eb42d6d10f8fe509117859defddf9e72b4fa4d0",
"deprecated": false,
"target": {
"function": "r871xu_dev_remove",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-408524e8",
"digest": {
"function_hash": "249712165882066939466196005927966215985",
"length": 586.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@205e039fead72e87ad2838f5e649a4c4834f648b",
"deprecated": false,
"target": {
"function": "r8712_usb_dvobj_deinit",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-46e09f04",
"digest": {
"function_hash": "294323057906760878418382000322794272363",
"length": 43.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2882b8baad068d21c99fb2ab5a85a2bdbd5b834",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-4853979f",
"digest": {
"line_hashes": [
"11454000843227603145422226803453866583",
"198139507487915063875564393192799477126",
"92634571631991620270363136337402668854",
"217289726663555589233307361931536959517"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8eb42d6d10f8fe509117859defddf9e72b4fa4d0",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-4a69afef",
"digest": {
"line_hashes": [
"216881989835896042385092986034245485204",
"309900353203788951896127709394628401469",
"66238712593917009143560462746059245225",
"10896270985457156893880161390845867258",
"199033864222432391319303386249230199163",
"65654631104413068872874389286694974191",
"28806550789021141268823946377896017758",
"36044492515384129272363757583181011872",
"182011850806433237349179685398246577412",
"54771284738687596767868736978723710327",
"230661934804597152949172153061130900341",
"205929245827933323559272730727857702211",
"49739314098222879734032015919266328751"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7288ff561de650d4139fab80e9cb0da9b5b32434",
"deprecated": false,
"target": {
"function": "r8712_usb_dvobj_deinit",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-519b0fe2",
"digest": {
"function_hash": "294323057906760878418382000322794272363",
"length": 43.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5a89a92efc342dd7c44b6056da87debc598f9c73",
"deprecated": false,
"target": {
"function": "r871xu_dev_remove",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-52247a64",
"digest": {
"function_hash": "249712165882066939466196005927966215985",
"length": 586.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7288ff561de650d4139fab80e9cb0da9b5b32434",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-5b09b50a",
"digest": {
"line_hashes": [
"11454000843227603145422226803453866583",
"198139507487915063875564393192799477126",
"92634571631991620270363136337402668854",
"217289726663555589233307361931536959517"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8eb42d6d10f8fe509117859defddf9e72b4fa4d0",
"deprecated": false,
"target": {
"function": "r871x_dev_unload",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-5b1228c2",
"digest": {
"function_hash": "149901254257519306938334437111310165268",
"length": 318.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@205e039fead72e87ad2838f5e649a4c4834f648b",
"deprecated": false,
"target": {
"function": "r871xu_dev_remove",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-5fe357ff",
"digest": {
"function_hash": "249712165882066939466196005927966215985",
"length": 586.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7288ff561de650d4139fab80e9cb0da9b5b32434",
"deprecated": false,
"target": {
"function": "r871x_dev_unload",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-6e206f76",
"digest": {
"function_hash": "149901254257519306938334437111310165268",
"length": 318.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@205e039fead72e87ad2838f5e649a4c4834f648b",
"deprecated": false,
"target": {
"function": "r871x_dev_unload",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-6e2a06f4",
"digest": {
"function_hash": "149901254257519306938334437111310165268",
"length": 318.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@205e039fead72e87ad2838f5e649a4c4834f648b",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-70b8556a",
"digest": {
"line_hashes": [
"11454000843227603145422226803453866583",
"198139507487915063875564393192799477126",
"92634571631991620270363136337402668854",
"217289726663555589233307361931536959517"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2882b8baad068d21c99fb2ab5a85a2bdbd5b834",
"deprecated": false,
"target": {
"function": "r871x_dev_unload",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-71569d89",
"digest": {
"function_hash": "149901254257519306938334437111310165268",
"length": 318.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2882b8baad068d21c99fb2ab5a85a2bdbd5b834",
"deprecated": false,
"target": {
"function": "r8712_free_drv_sw",
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-7be266f9",
"digest": {
"function_hash": "328141364447425612405611816703367450725",
"length": 306.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@205e039fead72e87ad2838f5e649a4c4834f648b",
"deprecated": false,
"target": {
"function": "r8712_free_drv_sw",
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-a2cebe3b",
"digest": {
"function_hash": "328141364447425612405611816703367450725",
"length": 306.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7288ff561de650d4139fab80e9cb0da9b5b32434",
"deprecated": false,
"target": {
"function": "r871xu_dev_remove",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-a952eb73",
"digest": {
"function_hash": "249712165882066939466196005927966215985",
"length": 586.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2882b8baad068d21c99fb2ab5a85a2bdbd5b834",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-ace74a73",
"digest": {
"line_hashes": [
"216881989835896042385092986034245485204",
"309900353203788951896127709394628401469",
"66238712593917009143560462746059245225",
"10896270985457156893880161390845867258",
"199033864222432391319303386249230199163",
"65654631104413068872874389286694974191",
"28806550789021141268823946377896017758",
"36044492515384129272363757583181011872",
"182011850806433237349179685398246577412",
"54771284738687596767868736978723710327",
"230661934804597152949172153061130900341",
"205929245827933323559272730727857702211",
"49739314098222879734032015919266328751"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@205e039fead72e87ad2838f5e649a4c4834f648b",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-bcd072ea",
"digest": {
"line_hashes": [
"216881989835896042385092986034245485204",
"309900353203788951896127709394628401469",
"66238712593917009143560462746059245225",
"10896270985457156893880161390845867258",
"199033864222432391319303386249230199163",
"65654631104413068872874389286694974191",
"28806550789021141268823946377896017758",
"36044492515384129272363757583181011872",
"182011850806433237349179685398246577412",
"54771284738687596767868736978723710327",
"230661934804597152949172153061130900341",
"205929245827933323559272730727857702211",
"49739314098222879734032015919266328751"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7288ff561de650d4139fab80e9cb0da9b5b32434",
"deprecated": false,
"target": {
"function": "r8712_free_drv_sw",
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-c68c9c33",
"digest": {
"function_hash": "328141364447425612405611816703367450725",
"length": 306.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2882b8baad068d21c99fb2ab5a85a2bdbd5b834",
"deprecated": false,
"target": {
"function": "r8712_usb_dvobj_deinit",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-d0ae27f2",
"digest": {
"function_hash": "294323057906760878418382000322794272363",
"length": 43.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5a89a92efc342dd7c44b6056da87debc598f9c73",
"deprecated": false,
"target": {
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Line",
"id": "CVE-2022-49312-e5fabc1f",
"digest": {
"line_hashes": [
"216881989835896042385092986034245485204",
"309900353203788951896127709394628401469",
"66238712593917009143560462746059245225",
"10896270985457156893880161390845867258",
"199033864222432391319303386249230199163",
"65654631104413068872874389286694974191",
"28806550789021141268823946377896017758",
"36044492515384129272363757583181011872",
"182011850806433237349179685398246577412",
"54771284738687596767868736978723710327",
"230661934804597152949172153061130900341",
"205929245827933323559272730727857702211",
"49739314098222879734032015919266328751"
],
"threshold": 0.9
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8eb42d6d10f8fe509117859defddf9e72b4fa4d0",
"deprecated": false,
"target": {
"function": "r8712_free_drv_sw",
"file": "drivers/staging/rtl8712/os_intfs.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-f12aa5e4",
"digest": {
"function_hash": "328141364447425612405611816703367450725",
"length": 306.0
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8eb42d6d10f8fe509117859defddf9e72b4fa4d0",
"deprecated": false,
"target": {
"function": "r8712_usb_dvobj_deinit",
"file": "drivers/staging/rtl8712/usb_intf.c"
},
"signature_type": "Function",
"id": "CVE-2022-49312-ffbeba61",
"digest": {
"function_hash": "294323057906760878418382000322794272363",
"length": 43.0
}
}
]