CVE-2022-50513

Source
https://cve.org/CVERecord?id=CVE-2022-50513
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50513.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50513
Downstream
Related
Published
2025-10-07T15:19:09.547Z
Modified
2026-03-12T03:26:35.508439Z
Summary
staging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv()
Details

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

staging: rtl8723bs: fix a potential memory leak in rtwinitcmd_priv()

In rtwinitcmd_priv(), if pcmdpriv->rsp_allocated_buf is allocated in failure, then pcmdpriv->cmd_allocated_buf will be not properly released. Besides, considering there are only two error paths and the first one can directly return, so we do not need implicitly jump to the exit tag to execute the error handler.

So this patch added kfree(pcmdpriv->cmd_allocated_buf); on the error path to release the resource and simplified the return logic of rtwinitcmd_priv(). As there is no proper device to test with, no runtime testing was performed.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50513.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
554c0a3abf216c991c5ebddcdb2c08689ecd290b
Fixed
e5d8f05edb36fc4ab15beec62cb6ab62f5a60fe2
Fixed
e6cc39db24a63f68314473621020ed8cad7be423
Fixed
39bef9c6a91bbb790d04c1347cfeae584541fb6a
Fixed
a5be64ff6d21f7805a91e6d81f53fc19cd9f0fae
Fixed
8db6ca84eee0ac258706f3fca54f7c021cb159ef
Fixed
708056fba733a73d926772ea4ce9a42d240345da

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50513.json"