In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix uninitialized pointer free in addinoderef()
The addinoderef() function does not initialize the "name" struct when it is declared. If any of the following calls to "readoneinode() returns NULL,
dir = read_one_inode(root, parent_objectid);
if (!dir) {
ret = -ENOENT;
goto out;
}
inode = read_one_inode(root, inode_objectid);
if (!inode) {
ret = -EIO;
goto out;
}
then "name.name" would be freed on "out" before being initialized.
out: ... kfree(name.name);
This issue was reported by Coverity with CID 1526744.