| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2024-50088: btrfs: fix uninitialized pointer free in add_inode_ref() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| btrfs: fix uninitialized pointer free in add_inode_ref() |
| |
| The add_inode_ref() function does not initialize the "name" struct when |
| it is declared. If any of the following calls to "read_one_inode() |
| 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. |
| |
| The Linux kernel CVE team has assigned CVE-2024-50088 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.1.57 with commit 1cf474cd474bc5d3ef63086ffd009a87a5b7bb2e and fixed in 6.1.114 with commit 12cf028381aa19bc38465341512c280256e8d82d |
| Issue introduced in 6.2 with commit e43eec81c5167b655b72c781b0e75e62a05e415e and fixed in 6.6.58 with commit e11ce03b58743bf1e096c48fcaa7e6f08eb75dfa |
| Issue introduced in 6.2 with commit e43eec81c5167b655b72c781b0e75e62a05e415e and fixed in 6.11.5 with commit a941f3d5b1469c60a7e70e775584f110b47e0d16 |
| Issue introduced in 6.2 with commit e43eec81c5167b655b72c781b0e75e62a05e415e and fixed in 6.12 with commit 66691c6e2f18d2aa4b22ffb624b9bdc97e9979e4 |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2024-50088 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| fs/btrfs/tree-log.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/12cf028381aa19bc38465341512c280256e8d82d |
| https://git.kernel.org/stable/c/e11ce03b58743bf1e096c48fcaa7e6f08eb75dfa |
| https://git.kernel.org/stable/c/a941f3d5b1469c60a7e70e775584f110b47e0d16 |
| https://git.kernel.org/stable/c/66691c6e2f18d2aa4b22ffb624b9bdc97e9979e4 |