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.
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1980.0,
"function_hash": "160743591431131992993525088401481375941"
},
"id": "CVE-2024-50088-7675e98c",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a941f3d5b1469c60a7e70e775584f110b47e0d16",
"target": {
"file": "fs/btrfs/tree-log.c",
"function": "add_inode_ref"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208376436273443476898824877031549214793",
"45527007565653637558889049102743100190",
"5372683035419283316579817973645690830",
"294129945062263526506395651423338477910"
]
},
"id": "CVE-2024-50088-78c7f5cd",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@12cf028381aa19bc38465341512c280256e8d82d",
"target": {
"file": "fs/btrfs/tree-log.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1988.0,
"function_hash": "45628406907262658994080691562875153922"
},
"id": "CVE-2024-50088-c22c5426",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@12cf028381aa19bc38465341512c280256e8d82d",
"target": {
"file": "fs/btrfs/tree-log.c",
"function": "add_inode_ref"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208376436273443476898824877031549214793",
"45527007565653637558889049102743100190",
"5372683035419283316579817973645690830",
"294129945062263526506395651423338477910"
]
},
"id": "CVE-2024-50088-e4cb4239",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e11ce03b58743bf1e096c48fcaa7e6f08eb75dfa",
"target": {
"file": "fs/btrfs/tree-log.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208376436273443476898824877031549214793",
"45527007565653637558889049102743100190",
"5372683035419283316579817973645690830",
"294129945062263526506395651423338477910"
]
},
"id": "CVE-2024-50088-f2282843",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a941f3d5b1469c60a7e70e775584f110b47e0d16",
"target": {
"file": "fs/btrfs/tree-log.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1988.0,
"function_hash": "45628406907262658994080691562875153922"
},
"id": "CVE-2024-50088-f90df6b3",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e11ce03b58743bf1e096c48fcaa7e6f08eb75dfa",
"target": {
"file": "fs/btrfs/tree-log.c",
"function": "add_inode_ref"
}
}
]