# CVE-2022-49312: staging: rtl8712: fix a potential memory leak in r871xu_drv_init()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 14% of CVEs (2026-11-30)
- Published: 2025-02-26T02:10:41.627Z
- Modified: 2026-06-17T05:17:40.907Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

staging: rtl8712: fix a potential memory leak in r871xu_drv_init()

In r871xu_drv_init(), if r8712_init_drv_sw() fails, then the memory
allocated by r8712_alloc_io_queue() in r8712_usb_dvobj_init() is not
properly released as there is no action will be performed by
r8712_usb_dvobj_deinit().
To properly release it, we should call r8712_free_io_queue() in
r8712_usb_dvobj_deinit().

Besides, in r871xu_dev_remove(), r8712_usb_dvobj_deinit() will be called
by r871x_dev_unload() under condition `padapter->bup` and
r8712_free_io_queue() is called by r8712_free_drv_sw().
However, r8712_usb_dvobj_deinit() does not rely on `padapter->bup` and
calling r8712_free_io_queue() in r8712_free_drv_sw() is negative for
better understading the code.
So I move r8712_usb_dvobj_deinit() into r871xu_dev_remove(), and remove
r8712_free_io_queue() from r8712_free_drv_sw().

(As written by CVE List.)

## Affected

- Linux Linux: from 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef before 5a89a92efc342dd7c44b6056da87debc598f9c73; from 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef before 8eb42d6d10f8fe509117859defddf9e72b4fa4d0; from 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef before 205e039fead72e87ad2838f5e649a4c4834f648b; from 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef before a2882b8baad068d21c99fb2ab5a85a2bdbd5b834; from 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef before 7288ff561de650d4139fab80e9cb0da9b5b32434; 2.6.37 (not affected: before 2.6.37; from 5.10.122 up to 5.10.*; from 5.15.47 up to 5.15.*; from 5.17.15 up to 5.17.*; from 5.18.4 up to 5.18.*; from 5.19 up to *)
- linux linux_kernel: before 5.10.122; from 5.11 before 5.15.47; from 5.16 before 5.17.15; from 5.18 before 5.18.4

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/5a89a92efc342dd7c44b6056da87debc598f9c73> (patch)
- <https://git.kernel.org/stable/c/8eb42d6d10f8fe509117859defddf9e72b4fa4d0> (patch)
- <https://git.kernel.org/stable/c/205e039fead72e87ad2838f5e649a4c4834f648b> (patch)
- <https://git.kernel.org/stable/c/a2882b8baad068d21c99fb2ab5a85a2bdbd5b834> (patch)
- <https://git.kernel.org/stable/c/7288ff561de650d4139fab80e9cb0da9b5b32434> (patch)

## Sources

- CVE List: [CVE-2022-49312](https://www.cve.org/CVERecord?id=CVE-2022-49312), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-49312](https://nvd.nist.gov/vuln/detail/CVE-2022-49312), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-49312 · Whole record: https://cve.day/CVE-2022-49312.json · Rebuilt by cve.day 2026-11-25T22:58:20.391Z
