Headline
CVE-2023-4394: fs: btrfs: fix possible memory leaks in btrfs_get_dev_args_from_path()
A use-after-free flaw was found in btrfs_get_dev_args_from_path in fs/btrfs/volumes.c in btrfs file-system in the Linux Kernel. This flaw allows a local attacker with special privileges to cause a system crash or leak internal kernel information
Message ID
[email protected] (mailing list archive)
State
New, archived
Headers
show
Series
fs: btrfs: fix possible memory leaks in btrfs_get_dev_args_from_path() | expand
Commit Message****Comments
Patch
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 272901514b0c…064ab2a79c80 100644 — a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2345,8 +2345,11 @@ int btrfs_get_dev_args_from_path(struct btrfs_fs_info *fs_info,
ret = btrfs\_get\_bdev\_and\_sb(path, FMODE\_READ, fs\_info->bdev\_holder, 0,
&bdev, &disk\_super);
- if (ret)
- if (ret) {
btrfs\_put\_dev\_args\_from\_path(args); return ret;
- }
- args->devid = btrfs_stack_device_id(&disk_super->dev_item); memcpy(args->uuid, disk_super->dev_item.uuid, BTRFS_UUID_SIZE); if (btrfs_fs_incompat(fs_info, METADATA_UUID))