CVE-2022-50845 ext4: fix inode leak in ext4_xattr_inode_create() on an error path

Not scored Published Updated

A local attacker can cause an inode leak in the ext4 filesystem by triggering an error path during extended attribute creation, leading to resource exhaustion.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50845?

CVE-2022-50845 is a denial of service vulnerability in Linux, published on 30 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.

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

Which versions are affected by CVE-2022-50845?

How do I fix CVE-2022-50845?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-50845 being exploited?

There is no known exploitation of CVE-2022-50845 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2022-50845, GHSA-cmjr-fqjm-v74q, UBUNTU-CVE-2022-50845.

Is CVE-2022-50845 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free