# CVE-2024-50088: btrfs: fix uninitialized pointer free in add_inode_ref()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2024-10-29T00:50:31.362Z
- Modified: 2026-08-05T11:41:33.818Z
- Weaknesses: CWE-824
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 1cf474cd474bc5d3ef63086ffd009a87a5b7bb2e before 12cf028381aa19bc38465341512c280256e8d82d; from e43eec81c5167b655b72c781b0e75e62a05e415e before e11ce03b58743bf1e096c48fcaa7e6f08eb75dfa; from e43eec81c5167b655b72c781b0e75e62a05e415e before a941f3d5b1469c60a7e70e775584f110b47e0d16; from e43eec81c5167b655b72c781b0e75e62a05e415e before 66691c6e2f18d2aa4b22ffb624b9bdc97e9979e4; from 6.1.57 before 6.1.114; 6.2 (not affected: before 6.2; from 6.1.114 up to 6.1.*; from 6.6.58 up to 6.6.*; from 6.11.5 up to 6.11.*; from 6.12 up to *)
- linux linux_kernel: from 6.1.57 before 6.1.114; from 6.2 before 6.6.58; from 6.7 before 6.11.5; 6.12

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/12cf028381aa19bc38465341512c280256e8d82d> (patch)
- <https://git.kernel.org/stable/c/e11ce03b58743bf1e096c48fcaa7e6f08eb75dfa> (patch)
- <https://git.kernel.org/stable/c/a941f3d5b1469c60a7e70e775584f110b47e0d16> (patch)
- <https://git.kernel.org/stable/c/66691c6e2f18d2aa4b22ffb624b9bdc97e9979e4> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-50088](https://www.cve.org/CVERecord?id=CVE-2024-50088), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-50088](https://nvd.nist.gov/vuln/detail/CVE-2024-50088), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-50088 · Whole record: https://cve.day/CVE-2024-50088.json · Rebuilt by cve.day 2026-11-25T22:58:47.451Z
