CVE-2022-50513
staging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv()
Check your servers for CVE-2022-50513
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-50513 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv()
In rtw_init_cmd_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 rtw_init_cmd_priv(). As there is no proper device to test with, no runtime testing was performed.
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 5.38% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before e5d8f05edb36fc4ab15beec62cb6ab62f5a60fe2 affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before e6cc39db24a63f68314473621020ed8cad7be423 affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before 39bef9c6a91bbb790d04c1347cfeae584541fb6a affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before a5be64ff6d21f7805a91e6d81f53fc19cd9f0fae affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before 8db6ca84eee0ac258706f3fca54f7c021cb159ef affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before 708056fba733a73d926772ea4ce9a42d240345da
Other versions: unaffected
|
| Linux |
affected 4.12 unaffected before 4.12 unaffected from 5.4.220 up to and including 5.4.* unaffected from 5.10.150 up to and including 5.10.* unaffected from 5.15.75 up to and including 5.15.* unaffected from 5.19.17 up to and including 5.19.* unaffected from 6.0.3 up to and including 6.0.* unaffected 6.1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-50513 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50513
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2022-50513
trivy image --scanners vuln IMAGE | grep CVE-2022-50513
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/e5d8f05edb36fc4ab15beec62cb6ab62f5a60fe2 git.kernel.org
- https://git.kernel.org/stable/c/e6cc39db24a63f68314473621020ed8cad7be423 git.kernel.org
- https://git.kernel.org/stable/c/39bef9c6a91bbb790d04c1347cfeae584541fb6a git.kernel.org
- https://git.kernel.org/stable/c/a5be64ff6d21f7805a91e6d81f53fc19cd9f0fae git.kernel.org
- https://git.kernel.org/stable/c/8db6ca84eee0ac258706f3fca54f7c021cb159ef git.kernel.org
- https://git.kernel.org/stable/c/708056fba733a73d926772ea4ce9a42d240345da git.kernel.org
Source: the record CVE-2022-50513 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse