CVE-2022-50474
macintosh: fix possible memory leak in macio_add_one_device()
Check your servers for CVE-2022-50474
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-50474 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:
macintosh: fix possible memory leak in macio_add_one_device()
Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically. It needs to be freed when of_device_register() fails. Call put_device() to give up the reference that's taken in device_initialize(), so that it can be freed in kobject_cleanup() when the refcount hits 0.
macio device is freed in macio_release_dev(), so the kfree() can be removed.
Exploitation
EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.23% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 3a866ff6fc2232c8e393cdb55ffb8ce947349e03 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before aa9054267366ff0a382d403d17728e21951ddbb9 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 35858b87a943917fa30172aa4bf01ce7adbcb42c affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before b29a2f1dd33ae9b94821ab2f4d398b9081786748 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 2ac0a7059b7bcbed35bfffa34a82c9a9e99638ef affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 19ded60b40e86b0903c8d5bd0161437ed5107a8b affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before ca765257feb89dacf604ced9cd233db5f865dee0 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 76837e7f6b30da72ad59f56291e22804a219e015 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 5ca86eae55a2f006e6c1edd2029b2cacb6979515
Other versions: unaffected
|
| Linux |
affected 2.6.30 unaffected before 2.6.30 unaffected from 4.9.337 up to and including 4.9.* unaffected from 4.14.303 up to and including 4.14.* unaffected from 4.19.270 up to and including 4.19.* unaffected from 5.4.229 up to and including 5.4.* unaffected from 5.10.163 up to and including 5.10.* unaffected from 5.15.86 up to and including 5.15.* unaffected from 6.0.16 up to and including 6.0.* unaffected from 6.1.2 up to and including 6.1.* unaffected 6.2 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-50474 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50474
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-50474
trivy image --scanners vuln IMAGE | grep CVE-2022-50474
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/3a866ff6fc2232c8e393cdb55ffb8ce947349e03 git.kernel.org
- https://git.kernel.org/stable/c/aa9054267366ff0a382d403d17728e21951ddbb9 git.kernel.org
- https://git.kernel.org/stable/c/35858b87a943917fa30172aa4bf01ce7adbcb42c git.kernel.org
- https://git.kernel.org/stable/c/b29a2f1dd33ae9b94821ab2f4d398b9081786748 git.kernel.org
- https://git.kernel.org/stable/c/2ac0a7059b7bcbed35bfffa34a82c9a9e99638ef git.kernel.org
- https://git.kernel.org/stable/c/19ded60b40e86b0903c8d5bd0161437ed5107a8b git.kernel.org
- https://git.kernel.org/stable/c/ca765257feb89dacf604ced9cd233db5f865dee0 git.kernel.org
- https://git.kernel.org/stable/c/76837e7f6b30da72ad59f56291e22804a219e015 git.kernel.org
- https://git.kernel.org/stable/c/5ca86eae55a2f006e6c1edd2029b2cacb6979515 git.kernel.org
Source: the record CVE-2022-50474 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