{"id":"CVE-2022-49996","summary":"btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix possible memory leak in btrfs_get_dev_args_from_path()\n\nIn btrfs_get_dev_args_from_path(), btrfs_get_bdev_and_sb() can fail if\nthe path is invalid. In this case, btrfs_get_dev_args_from_path()\nreturns directly without freeing args-\u003euuid and args-\u003efsid allocated\nbefore, which causes memory leak.\n\nTo fix these possible leaks, when btrfs_get_bdev_and_sb() fails,\nbtrfs_put_dev_args_from_path() is called to clean up the memory.","modified":"2026-08-12T03:51:48.041463360Z","published":"2025-06-18T11:00:56.175Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49996.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/4b124ad87244cd7f0883c5eaa38d2326b2154cad"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5f52402c77013e4a826394b807dd5ea4dc83bd72"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9ea0106a7a3d8116860712e3f17cd52ce99f6707"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49996.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49996"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"321a81835b4aed4f717f89921286f6544ffa8be9"},{"fixed":"5f52402c77013e4a826394b807dd5ea4dc83bd72"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"faa775c41d655a4786e9d53cb075a77bb5a75f66"},{"fixed":"4b124ad87244cd7f0883c5eaa38d2326b2154cad"},{"fixed":"9ea0106a7a3d8116860712e3f17cd52ce99f6707"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5.15.54"},{"fixed":"5.15.64"}]}],"versions":["v5.15.63","v5.15.62","v5.15.61","v5.15.60","v5.15.59","v5.15.58","v5.15.57","v5.15.56","v5.15.55","v5.15.54"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49996.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.15.64"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.19.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49996.json"}}],"schema_version":"1.9.0"}