# CVE-2022-50469: staging: rtl8723bs: fix potential memory leak in rtw_init_drv_sw()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `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.17%, higher than 6% of CVEs (2026-12-02)
- Published: 2025-10-01T11:45:39.811Z
- Modified: 2026-06-17T05:23:36.970Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

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

staging: rtl8723bs: fix potential memory leak in rtw_init_drv_sw()

In rtw_init_drv_sw(), there are various init functions are called to
populate the padapter structure and some checks for their return value.
However, except for the first one error path, the other five error paths
do not properly release the previous allocated resources, which leads to
various memory leaks.

This patch fixes them and keeps the success and error separate.
Note that these changes keep the form of `rtw_init_drv_sw()` in
"drivers/staging/r8188eu/os_dep/os_intfs.c". As there is no proper device
to test with, no runtime testing was performed.

(As written by CVE List.)

## Affected

- Linux Linux: from 554c0a3abf216c991c5ebddcdb2c08689ecd290b before b4573a2bad3c3e2643ef3939079eb7035a30e6ee; from 554c0a3abf216c991c5ebddcdb2c08689ecd290b before 6b2052b365f8035ab7f09ac24b5b499002b298cb; from 554c0a3abf216c991c5ebddcdb2c08689ecd290b before d95d1526d9f06978c1a7186810a5490d72c62742; from 554c0a3abf216c991c5ebddcdb2c08689ecd290b before 5a5aa9cce621e2c0e25a1e5d72d6be1749167cc0; 4.12 (not affected: before 4.12; from 5.15.75 up to 5.15.*; from 5.19.17 up to 5.19.*; from 6.0.3 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 4.12 before 5.15.75; from 5.16 before 5.19.17; from 6.0 before 6.0.3

## References

- <https://git.kernel.org/stable/c/b4573a2bad3c3e2643ef3939079eb7035a30e6ee> (patch)
- <https://git.kernel.org/stable/c/6b2052b365f8035ab7f09ac24b5b499002b298cb> (patch)
- <https://git.kernel.org/stable/c/d95d1526d9f06978c1a7186810a5490d72c62742> (patch)
- <https://git.kernel.org/stable/c/5a5aa9cce621e2c0e25a1e5d72d6be1749167cc0> (patch)

## Sources

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

---

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