CVE-2022-49996
btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()
Check your servers for CVE-2022-49996
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-49996 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:
btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()
In btrfs_get_dev_args_from_path(), btrfs_get_bdev_and_sb() can fail if the path is invalid. In this case, btrfs_get_dev_args_from_path() returns directly without freeing args->uuid and args->fsid allocated before, which causes memory leak.
To fix these possible leaks, when btrfs_get_bdev_and_sb() fails, btrfs_put_dev_args_from_path() is called to clean up the memory.
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.9% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 321a81835b4aed4f717f89921286f6544ffa8be9, before 5f52402c77013e4a826394b807dd5ea4dc83bd72 affected from faa775c41d655a4786e9d53cb075a77bb5a75f66, before 4b124ad87244cd7f0883c5eaa38d2326b2154cad affected from faa775c41d655a4786e9d53cb075a77bb5a75f66, before 9ea0106a7a3d8116860712e3f17cd52ce99f6707 affected from 5.15.54, before 5.15.64
Other versions: unaffected
|
| Linux |
affected 5.16 unaffected before 5.16 unaffected from 5.15.64 up to and including 5.15.* unaffected from 5.19.6 up to and including 5.19.* unaffected 6.0 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-49996 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-49996
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-49996
trivy image --scanners vuln IMAGE | grep CVE-2022-49996
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/5f52402c77013e4a826394b807dd5ea4dc83bd72 git.kernel.org
- https://git.kernel.org/stable/c/4b124ad87244cd7f0883c5eaa38d2326b2154cad git.kernel.org
- https://git.kernel.org/stable/c/9ea0106a7a3d8116860712e3f17cd52ce99f6707 git.kernel.org
Source: the record CVE-2022-49996 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