{"id":"CVE-2022-50513","published":"2025-10-07T15:19:09Z","modified":"2026-05-11T19:20:52Z","title":"staging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nstaging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv()\n\nIn rtw_init_cmd_priv(), if `pcmdpriv->rsp_allocated_buf` is allocated\nin failure, then `pcmdpriv->cmd_allocated_buf` will be not properly\nreleased. Besides, considering there are only two error paths and the\nfirst one can directly return, so we do not need implicitly jump to the\n`exit` tag to execute the error handler.\n\nSo this patch added `kfree(pcmdpriv->cmd_allocated_buf);` on the error\npath to release the resource and simplified the return logic of\nrtw_init_cmd_priv(). As there is no proper device to test with, no runtime\ntesting was performed.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.0016,"percentile":0.05086,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/e5d8f05edb36fc4ab15beec62cb6ab62f5a60fe2","tags":[]},{"url":"https://git.kernel.org/stable/c/e6cc39db24a63f68314473621020ed8cad7be423","tags":[]},{"url":"https://git.kernel.org/stable/c/39bef9c6a91bbb790d04c1347cfeae584541fb6a","tags":[]},{"url":"https://git.kernel.org/stable/c/a5be64ff6d21f7805a91e6d81f53fc19cd9f0fae","tags":[]},{"url":"https://git.kernel.org/stable/c/8db6ca84eee0ac258706f3fca54f7c021cb159ef","tags":[]},{"url":"https://git.kernel.org/stable/c/708056fba733a73d926772ea4ce9a42d240345da","tags":[]}],"priority":{"score":1.0,"factors":[{"name":"EPSS percentile","points":1.02}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 554c0a3abf216c991c5ebddcdb2c08689ecd290b, < e5d8f05edb36fc4ab15beec62cb6ab62f5a60fe2",">= 554c0a3abf216c991c5ebddcdb2c08689ecd290b, < e6cc39db24a63f68314473621020ed8cad7be423",">= 554c0a3abf216c991c5ebddcdb2c08689ecd290b, < 39bef9c6a91bbb790d04c1347cfeae584541fb6a",">= 554c0a3abf216c991c5ebddcdb2c08689ecd290b, < a5be64ff6d21f7805a91e6d81f53fc19cd9f0fae",">= 554c0a3abf216c991c5ebddcdb2c08689ecd290b, < 8db6ca84eee0ac258706f3fca54f7c021cb159ef",">= 554c0a3abf216c991c5ebddcdb2c08689ecd290b, < 708056fba733a73d926772ea4ce9a42d240345da"]},{"vendor":"Linux","product":"Linux","versions":["4.12"]}],"euvd":{"id":"EUVD-2025-32022","exploited":false,"provenance":"source"}}