What’s Vulnerable › Vulnerabilities
CVE-2022-49996: btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-06-18 · updated 2026-06-17
- Weakness: CWE-401
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.
Affected products
- Linux kernel: from 5.15.54 before 5.15.64; from 5.16 before 5.19.6; 6.0-rc1, 6.0-rc2 — fixed in 5.15.64, 5.19.6
How to fix
Upgrade to a fixed version: Linux kernel 5.15.64, 5.19.6. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/4b124ad87244cd7f0883c5eaa38d2326b2154cad
- https://git.kernel.org/stable/c/5f52402c77013e4a826394b807dd5ea4dc83bd72
- https://git.kernel.org/stable/c/9ea0106a7a3d8116860712e3f17cd52ce99f6707
Get alerted when CVE-2022-49996 or the next vulnerability affects your stack