# CVE-2022-50512: ext4: fix potential memory leak in ext4_fc_record_regions()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-10-07T15:19:08.854Z
- Modified: 2026-06-17T05:23:41.867Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

ext4: fix potential memory leak in ext4_fc_record_regions()

As krealloc may return NULL, in this case 'state->fc_regions' may not be
freed by krealloc, but 'state->fc_regions' already set NULL. Then will
lead to 'state->fc_regions' memory leak.

(As written by CVE List.)

## Affected

- Linux Linux: from 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 before 2cfb769d60a2a57eb3566765428b6131cd16dcfe; from 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 before 417b0455a0b6d0f60a2930592731d1f8340e24be; from 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 before a4058b869e6c5e517c79e30532a350d0f3115c3e; from 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 before 518566e71ad86b7c2f1bf6d9caee9588bb7ac158; from 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 before 7069d105c1f15c442b68af43f7fde784f3126739; 5.10 (not affected: before 5.10; from 5.10.150 up to 5.10.*; from 5.15.75 up to 5.15.*; from 5.19.17 up to 5.19.*; from 6.0.3 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 5.10 before 5.10.150; from 5.11 before 5.15.75; from 5.16 before 5.19.17; from 6.0 before 6.0.3

## References

- <https://git.kernel.org/stable/c/2cfb769d60a2a57eb3566765428b6131cd16dcfe> (patch)
- <https://git.kernel.org/stable/c/417b0455a0b6d0f60a2930592731d1f8340e24be> (patch)
- <https://git.kernel.org/stable/c/a4058b869e6c5e517c79e30532a350d0f3115c3e> (patch)
- <https://git.kernel.org/stable/c/518566e71ad86b7c2f1bf6d9caee9588bb7ac158> (patch)
- <https://git.kernel.org/stable/c/7069d105c1f15c442b68af43f7fde784f3126739> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2022-50512 · Whole record: https://cve.day/CVE-2022-50512.json · Rebuilt by cve.day 2026-11-25T22:58:21.249Z
