What’s Vulnerable › Vulnerabilities

CVE-2022-50367: fs: fix UAF/GPF bug in nilfs_mdt_destroy

Description

In the Linux kernel, the following vulnerability has been resolved: fs: fix UAF/GPF bug in nilfs_mdt_destroy In alloc_inode, inode_init_always() could return -ENOMEM if security_inode_alloc() fails, which causes inode->i_private uninitialized. Then nilfs_is_metadata_file_inode() returns true and nilfs_free_inode() wrongly calls nilfs_mdt_destroy(), which frees the uninitialized inode->i_private and leads to crashes(e.g., UAF/GPF). Fix this by moving security_inode_alloc just prior to this_cpu_inc(nr_inodes)

Affected products

How to fix

Upgrade to a fixed version: Linux kernel 4.14.296, 4.19.262, 4.9.331, 5.10.148. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2022-50367 or the next vulnerability affects your stack