# CVE-2022-50845: ext4: fix inode leak in ext4\_xattr\_inode\_create() on an error path

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.27% (percentile 12, 2026-11-26)
- **Published:** 2025-12-30T12:11:02.615Z
- **Modified:** 2026-06-17T05:24:17.157Z

## Who should check

- Anyone running Linux \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 0f709e08caffb41bbc9b38b9a4c1bd0769794007; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< eab94a46560f68d4bcd15222701ced479f84f427; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 9ef603086c5b796fde1c7f22a17d0fc826ba54cb; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 9882601ee689975c1c0076ee65bf222a2a35e535; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 322cf639b0b7f137543072c55545adab782b3a25; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< fdaaf45786dc8c17a72901021772520fceb18f8c; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 70e5b46beba64706430a87a6d516054225e8ac8a; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< e4db04f7d3dbbe16680e0ded27ea2a65b10f766a
- Anyone running Linux 4.13

## Description

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

ext4: fix inode leak in ext4\_xattr\_inode\_create() on an error path

There is issue as follows when do setxattr with inject fault:

\[localhost\]\# fsck.ext4  -fn  /dev/sda
e2fsck 1.46.6-rc1 (12-Sep-2022)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Unattached zero-length inode 15.  Clear? no

Unattached inode 15
Connect to /lost+found? no

Pass 5: Checking group summary information

/dev/sda: \*\*\*\*\*\*\*\*\*\* WARNING: Filesystem still has errors \*\*\*\*\*\*\*\*\*\*

/dev/sda: 15/655360 files (0.0% non-contiguous), 66755/2621440 blocks

This occurs in 'ext4\_xattr\_inode\_create()'. If 'ext4\_mark\_inode\_dirty()'
fails, dropping i\_nlink of the inode is needed. Or will lead to inode leak.

## Affected and fixed versions

- Linux: \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 0f709e08caffb41bbc9b38b9a4c1bd0769794007; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< eab94a46560f68d4bcd15222701ced479f84f427; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 9ef603086c5b796fde1c7f22a17d0fc826ba54cb; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 9882601ee689975c1c0076ee65bf222a2a35e535; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 322cf639b0b7f137543072c55545adab782b3a25; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< fdaaf45786dc8c17a72901021772520fceb18f8c; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 70e5b46beba64706430a87a6d516054225e8ac8a; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< e4db04f7d3dbbe16680e0ded27ea2a65b10f766a (cvelist)
- Linux: 4.13 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50845. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50845.md
Affected: Linux >= bd3b963b273e247e13979f98812a6e4979b5c1e4, < 0f709e08caffb41bbc9b38b9a4c1bd0769794007; >= bd3b963b273e247e13979f98812a6e4979b5c1e4, < eab94a46560f68d4bcd15222701ced479f84f427; >= bd3b963b273e247e13979f98812a6e4979b5c1e4, < 9ef603086c5b796fde1c7f22a17d0fc826ba54cb; >= bd3b963b273e247e13979f9…
Fixed in: Linux 0f709e08caffb41bbc9b38b9a4c1bd0769794007, Linux 9ef603086c5b796fde1c7f22a17d0fc826ba54cb, Linux 9882601ee689975c1c0076ee65bf222a2a35e535, Linux 322cf639b0b7f137543072c55545adab782b3a25, Linux 70e5b46beba64706430a87a6d516054225e8ac8a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50845 being exploited?

There is no confirmed exploitation: CVE-2022-50845 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50845?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2022-50845?

Linux \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 0f709e08caffb41bbc9b38b9a4c1bd0769794007; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< eab94a46560f68d4bcd15222701ced479f84f427; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 9ef603086c5b796fde1c7f22a17d0fc826ba54cb; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 9882601ee689975c1c0076ee65bf222a2a35e535; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 322cf639b0b7f137543072c55545adab782b3a25; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< fdaaf45786dc8c17a72901021772520fceb18f8c; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< 70e5b46beba64706430a87a6d516054225e8ac8a; \>= bd3b963b273e247e13979f98812a6e4979b5c1e4, \< e4db04f7d3dbbe16680e0ded27ea2a65b10f766a; Linux 4.13.

### Is there a fix for CVE-2022-50845?

Yes. Fixed in Linux 0f709e08caffb41bbc9b38b9a4c1bd0769794007, Linux 9ef603086c5b796fde1c7f22a17d0fc826ba54cb, Linux 9882601ee689975c1c0076ee65bf222a2a35e535, Linux 322cf639b0b7f137543072c55545adab782b3a25, Linux 70e5b46beba64706430a87a6d516054225e8ac8a. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50845?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/0f709e08caffb41bbc9b38b9a4c1bd0769794007>
- other: <https://git.kernel.org/stable/c/eab94a46560f68d4bcd15222701ced479f84f427>
- other: <https://git.kernel.org/stable/c/9ef603086c5b796fde1c7f22a17d0fc826ba54cb>
- other: <https://git.kernel.org/stable/c/9882601ee689975c1c0076ee65bf222a2a35e535>
- other: <https://git.kernel.org/stable/c/322cf639b0b7f137543072c55545adab782b3a25>
- other: <https://git.kernel.org/stable/c/fdaaf45786dc8c17a72901021772520fceb18f8c>
- other: <https://git.kernel.org/stable/c/70e5b46beba64706430a87a6d516054225e8ac8a>
- other: <https://git.kernel.org/stable/c/e4db04f7d3dbbe16680e0ded27ea2a65b10f766a>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50845>

HTML: <https://flawdb.com/CVE-2022-50845> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50845>
