ext4: fix inode leak in ext4_xattr_inode_create() on an error path
Published Dec 30, 2025
5.5
MEDIUMCVSS 3.1
EPSS 0.25%
Description
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 products
-
Affected
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
-
Affected
- 4.13
Unaffected
- ≥ 0, < 4.13
- ≥ 4.14.303, ≤ 4.14.*
- ≥ 4.19.270, ≤ 4.19.*
- ≥ 5.10.163, ≤ 5.10.*
- ≥ 5.15.87, ≤ 5.15.*
- ≥ 5.4.229, ≤ 5.4.*
- ≥ 6.0.18, ≤ 6.0.*
- ≥ 6.1.4, ≤ 6.1.*
- 6.2
Default status is the baseline for the product. Each version can override it (patched versions can be marked unaffected).
| Vendor | Product | Default status | Versions |
|---|---|---|---|
| Linux | Linux | unaffected | Affected
|
| Linux | Linux | affected | Affected
Unaffected
|
No data.
No data.
Red Hat Enterprise Linux 9
kernel-0:5.14.0-427.13.1.el9_4
Fixed · RHSA-2024:2394
Red Hat Enterprise Linux 9
kernel-0:5.14.0-427.13.1.el9_4
Fixed · RHSA-2024:2394
Red Hat Enterprise Linux 10
kernel
Not affected
Red Hat Enterprise Linux 6
kernel
Out of support scope
Red Hat Enterprise Linux 7
kernel
Fix deferred
Red Hat Enterprise Linux 7
kernel-rt
Fix deferred
Red Hat Enterprise Linux 8
kernel
Fix deferred
Red Hat Enterprise Linux 8
kernel-rt
Fix deferred
Red Hat Enterprise Linux 9
kernel-rt
Fix deferred
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 9 | kernel-0:5.14.0-427.13.1.el9_4 | Fixed | RHSA-2024:2394 |
| Red Hat Enterprise Linux 9 | kernel-0:5.14.0-427.13.1.el9_4 | Fixed | RHSA-2024:2394 |
| Red Hat Enterprise Linux 10 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 6 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 7 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Fix deferred | n/a |
| Red Hat Enterprise Linux 8 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Fix deferred | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
References (14)
- https://access.redhat.com/security/cve/CVE-2022-50845 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2426024 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-55853 Advisory
- https://git.kernel.org/stable/c/0f709e08caffb41bbc9b38b9a4c1bd0769794007
- https://git.kernel.org/stable/c/322cf639b0b7f137543072c55545adab782b3a25
- https://git.kernel.org/stable/c/70e5b46beba64706430a87a6d516054225e8ac8a
- https://git.kernel.org/stable/c/9882601ee689975c1c0076ee65bf222a2a35e535
- https://git.kernel.org/stable/c/9ef603086c5b796fde1c7f22a17d0fc826ba54cb
- https://git.kernel.org/stable/c/e4db04f7d3dbbe16680e0ded27ea2a65b10f766a
- https://git.kernel.org/stable/c/eab94a46560f68d4bcd15222701ced479f84f427
- https://git.kernel.org/stable/c/fdaaf45786dc8c17a72901021772520fceb18f8c
- https://lore.kernel.org/linux-cve-announce/2025123021-CVE-2022-50845-367a@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2022-50845
- https://www.cve.org/CVERecord?id=CVE-2022-50845
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
No data
GitHub
No data