CVE-2022-50845

ext4: fix inode leak in ext4_xattr_inode_create() on an error path

State
Published
Severity
Not scored
Published
Dec 30, 2025
Updated
May 11, 2026
Reserved
Dec 30, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • bd3b963b273e247e13979f98812a6e4979b5c1e4 to before 0f709e08caffb41bbc9b38b9a4c1bd0769794007Affected
  • bd3b963b273e247e13979f98812a6e4979b5c1e4 to before eab94a46560f68d4bcd15222701ced479f84f427Affected
  • bd3b963b273e247e13979f98812a6e4979b5c1e4 to before 9ef603086c5b796fde1c7f22a17d0fc826ba54cbAffected
  • bd3b963b273e247e13979f98812a6e4979b5c1e4 to before 9882601ee689975c1c0076ee65bf222a2a35e535Affected
  • bd3b963b273e247e13979f98812a6e4979b5c1e4 to before 322cf639b0b7f137543072c55545adab782b3a25Affected
  • bd3b963b273e247e13979f98812a6e4979b5c1e4 to before fdaaf45786dc8c17a72901021772520fceb18f8cAffected
  • bd3b963b273e247e13979f98812a6e4979b5c1e4 to before 70e5b46beba64706430a87a6d516054225e8ac8aAffected
  • bd3b963b273e247e13979f98812a6e4979b5c1e4 to before e4db04f7d3dbbe16680e0ded27ea2a65b10f766aAffected
LinuxLinux
  • 4.13Affected
  • before 4.13Not affected
  • 4.14.303 through 4.14.*Not affected
  • 4.19.270 through 4.19.*Not affected
  • 5.4.229 through 5.4.*Not affected
  • 5.10.163 through 5.10.*Not affected
  • 5.15.87 through 5.15.*Not affected
  • 6.0.18 through 6.0.*Not affected
  • 6.1.4 through 6.1.*Not affected
  • 6.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.