CVE-2022-50566
mtd: Fix device name leak when register device failed in add_mtd_device()
Check your servers for CVE-2022-50566
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-50566 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:
mtd: Fix device name leak when register device failed in add_mtd_device()
There is a kmemleak when register device failed: unreferenced object 0xffff888101aab550 (size 8): comm "insmod", pid 3922, jiffies 4295277753 (age 925.408s) hex dump (first 8 bytes): 6d 74 64 30 00 88 ff ff mtd0.... backtrace: [<00000000bde26724>] __kmalloc_node_track_caller+0x4e/0x150 [<000000003c32b416>] kvasprintf+0xb0/0x130 [<000000001f7a8f15>] kobject_set_name_vargs+0x2f/0xb0 [<000000006e781163>] dev_set_name+0xab/0xe0 [<00000000e30d0c78>] add_mtd_device+0x4bb/0x700 [<00000000f3d34de7>] mtd_device_parse_register+0x2ac/0x3f0 [<00000000c0d88488>] 0xffffffffa0238457 [<00000000b40d0922>] 0xffffffffa02a008f [<0000000023d17b9d>] do_one_initcall+0x87/0x2a0 [<00000000770f6ca6>] do_init_module+0xdf/0x320 [<000000007b6768fe>] load_module+0x2f98/0x3330 [<00000000346bed5a>] __do_sys_finit_module+0x113/0x1b0 [<00000000674c2290>] do_syscall_64+0x35/0x80 [<000000004c6a8d97>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
If register device failed, should call put_device() to give up the reference.
Exploitation
EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 17.5% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before a75f45afa932bfb24a2603ebcea5efd2e7cdcfd6 affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before 2302e2dc42b1f84f951c725ce742fc21c5a1e151 affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before db07fe76df01f40cb897d6e9066b84e46957beb3 affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before fa0d32ab8407d7481450c664fd0de64f2dae9489 affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before 330bc5533e8a8ed69cb951d5a8edce9bddb9db21 affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before 71212d73184845c944ef1b43f092e643e5bde003 affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before 1b172fb05d6315ecec082fd7544a3390e96f0d7e affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before bcabe1dc2a344adbb3382930a23e273ba9382277 affected from 1f24b5a8ecbb2a3c7080f418974d40e3ffedb221, before 895d68a39481a75c680aa421546931fb11942fa6
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-50566 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50566
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-50566
trivy image --scanners vuln IMAGE | grep CVE-2022-50566
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/a75f45afa932bfb24a2603ebcea5efd2e7cdcfd6 git.kernel.org
- https://git.kernel.org/stable/c/2302e2dc42b1f84f951c725ce742fc21c5a1e151 git.kernel.org
- https://git.kernel.org/stable/c/db07fe76df01f40cb897d6e9066b84e46957beb3 git.kernel.org
- https://git.kernel.org/stable/c/fa0d32ab8407d7481450c664fd0de64f2dae9489 git.kernel.org
- https://git.kernel.org/stable/c/330bc5533e8a8ed69cb951d5a8edce9bddb9db21 git.kernel.org
- https://git.kernel.org/stable/c/71212d73184845c944ef1b43f092e643e5bde003 git.kernel.org
- https://git.kernel.org/stable/c/1b172fb05d6315ecec082fd7544a3390e96f0d7e git.kernel.org
- https://git.kernel.org/stable/c/bcabe1dc2a344adbb3382930a23e273ba9382277 git.kernel.org
- https://git.kernel.org/stable/c/895d68a39481a75c680aa421546931fb11942fa6 git.kernel.org
Source: the record CVE-2022-50566 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