CVE-2022-50845
ext4: fix inode leak in ext4_xattr_inode_create() on an error path
Check your servers for CVE-2022-50845
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-50845 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Exploitation
EPSS 0.27%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 20.4% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from bd3b963b273e247e13979f98812a6e4979b5c1e4, before 0f709e08caffb41bbc9b38b9a4c1bd0769794007 affected from bd3b963b273e247e13979f98812a6e4979b5c1e4, before eab94a46560f68d4bcd15222701ced479f84f427 affected from bd3b963b273e247e13979f98812a6e4979b5c1e4, before 9ef603086c5b796fde1c7f22a17d0fc826ba54cb affected from bd3b963b273e247e13979f98812a6e4979b5c1e4, before 9882601ee689975c1c0076ee65bf222a2a35e535 affected from bd3b963b273e247e13979f98812a6e4979b5c1e4, before 322cf639b0b7f137543072c55545adab782b3a25 affected from bd3b963b273e247e13979f98812a6e4979b5c1e4, before fdaaf45786dc8c17a72901021772520fceb18f8c affected from bd3b963b273e247e13979f98812a6e4979b5c1e4, before 70e5b46beba64706430a87a6d516054225e8ac8a affected from bd3b963b273e247e13979f98812a6e4979b5c1e4, before e4db04f7d3dbbe16680e0ded27ea2a65b10f766a
Other versions: unaffected
|
| Linux |
affected 4.13 unaffected before 4.13 unaffected from 4.14.303 up to and including 4.14.* unaffected from 4.19.270 up to and including 4.19.* unaffected from 5.4.229 up to and including 5.4.* unaffected from 5.10.163 up to and including 5.10.* unaffected from 5.15.87 up to and including 5.15.* unaffected from 6.0.18 up to and including 6.0.* unaffected from 6.1.4 up to and including 6.1.* unaffected 6.2 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-50845 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50845
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2022-50845
trivy image --scanners vuln IMAGE | grep CVE-2022-50845
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/0f709e08caffb41bbc9b38b9a4c1bd0769794007 git.kernel.org
- https://git.kernel.org/stable/c/eab94a46560f68d4bcd15222701ced479f84f427 git.kernel.org
- https://git.kernel.org/stable/c/9ef603086c5b796fde1c7f22a17d0fc826ba54cb git.kernel.org
- https://git.kernel.org/stable/c/9882601ee689975c1c0076ee65bf222a2a35e535 git.kernel.org
- https://git.kernel.org/stable/c/322cf639b0b7f137543072c55545adab782b3a25 git.kernel.org
- https://git.kernel.org/stable/c/fdaaf45786dc8c17a72901021772520fceb18f8c git.kernel.org
- https://git.kernel.org/stable/c/70e5b46beba64706430a87a6d516054225e8ac8a git.kernel.org
- https://git.kernel.org/stable/c/e4db04f7d3dbbe16680e0ded27ea2a65b10f766a git.kernel.org
Source: the record CVE-2022-50845 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse