btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
05.15.645.19.66.0In 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.
From the CVE record · Linux
The Linux kernel's btrfs_get_dev_args_from_path() can leak memory when an invalid path causes btrfs_get_bdev_and_sb() to fail. The input does not establish whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is required.
Engineers running the Linux kernel should check whether their version includes the btrfs fix; affected versions are not specified.