fs: fix UAF/GPF bug in nilfs_mdt_destroy
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 64b79e632869ad3ef6c098a4731d559381da1115| No fix yet |
| Linux Linux |
|
|
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)
From the CVE record · Linux
A failure in security_inode_alloc() can leave an inode field uninitialized, causing NILFS inode cleanup to free it and potentially crash the kernel. The input does not specify how an attacker could trigger this condition or whether access or user interaction is required.
Teams running Linux kernels with NILFS support should check their kernel versions against the vendor advisory; affected versions are not specified.