btrfs: fix uninitialized pointer free on read_alloc_one_name() error
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix uninitialized pointer free on read_alloc_one_name() error
The function read_alloc_one_name() does not initialize the name field of the passed fscrypt_str struct if kmalloc fails to allocate the corresponding buffer. Thus, it is not guaranteed that fscrypt_str.name is initialized when freeing it.
This is a follow-up to the linked patch that fixes the remaining instances of the bug introduced by commit e43eec81c516 ("btrfs: use struct qstr instead of name and namelen pairs").
From the CVE record · Linux
In the Linux kernel's btrfs code, read_alloc_one_name() can leave a pointer uninitialized if a buffer allocation fails, then free that pointer. The input does not specify what an attacker could achieve or whether exploitation requires network access, local access, authentication, or user interaction.
Anyone running a Linux kernel with btrfs should check the vendor advisory to determine which versions are affected.