VDB

CVE-2023-53311

CVE-2023-53311 PUBLISHED CVSS 7.8 HIGH

nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput

Reported by linux · Published September 16, 2025

In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput During unmount process of nilfs2, nothing holds nilfs_root structure after nilfs2 detaches its writer in nilfs_detach_log_writer(). Previously, nilfs_evict_inode() could cause use-after-free read for nilfs_root if inodes are left in "garbage_list" and released by nilfs_dispose_list at the end of nilfs_detach_log_writer(), and this bug was fixed by commit 9b5a04ac3ad9 ("nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()"). However, it turned out that there is another possibility of UAF in the call path where mark_inode_dirty_sync() is called from iput(): nilfs_detach_log_writer() nilfs_dispose_list() iput() mark_inode_dirty_sync() __mark_inode_dirty() nilfs_dirty_inode() __nilfs_mark_inode_dirty() nilfs_load_inode_block() --> causes UAF of nilfs_root struct This can happen after commit 0ae45f63d4ef ("vfs: add support for a lazytime mount option"), which changed iput() to call mark_inode_dirty_sync() on its final reference if i_state has I_DIRTY_TIME flag and i_nlink is non-zero. This issue appears after commit 28a65b49eb53 ("nilfs2: do not write dirty data after degenerating to read-only") when using the syzbot reproducer, but the issue has potentially existed before. Fix this issue by adding a "purging flag" to the nilfs structure, setting that flag while disposing the "garbage_list" and checking it in __nilfs_mark_inode_dirty(). Unlike commit 9b5a04ac3ad9 ("nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()"), this patch does not rely on ns_writer to determine whether to skip operations, so as not to break recovery on mount. The nilfs_salvage_orphan_logs routine dirties the buffer of salvaged data before attaching the log writer, so changing __nilfs_mark_inode_dirty() to skip the operation when ns_writer is NULL will cause recovery write to fail. The purpose of using the cleanup-only flag is to allow for narrowing of such conditions.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-headersAmazon Linux4.14.326-245.539.amzn2
kernel-develAmazon Linux4.14.326-245.539.amzn2
kernelAmazon Linux6.1.49-69.116.amzn2023
kernel-tools-develAmazon Linux6.1.49-69.116.amzn2023
python3-perfAmazon Linux6.1.49-69.116.amzn2023
kernel-libbpf-staticAmazon Linux6.1.49-69.116.amzn2023

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8, 0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8, 0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8
LinuxLinux4.0, 0, 4.14.323
amazon:2kernel-headers0
amazon:2kernel-devel0
amazon:2023kernel0
amazon:2023kernel-tools-devel0
amazon:2023python3-perf0
amazon:2023kernel-libbpf-static0
linuxlinux_kernel4.0, 4.0, 4.0
amazon:2023kernel-headers0
amazon:2023bpftool0
amazon:2kernel-livepatch-4.14.326-245.5390
amazon:2kernel-tools0
amazon:2kernel0
amazon:2023kernel-devel0
amazon:2023kernel-libbpf-devel0
LinuxLinux0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8, 5.10.191, 4.14.323
amazon:2023perf0
amazon:2python-perf0
amazon:2kernel-tools-devel0

…and 4 more

Timeline

  • Sep 16, 2025 CVE Published
  • Sep 17, 2025 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2025 Coalition ESS Score (16 in total, the first dated here)
  • Oct 12, 2025 PoC Published (7 in total, the first dated here)
  • Jan 24, 2026 Security Advisory (87 in total, the first dated here)
  • Oct 7, 2026 Distribution Patch (76 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-53311
vulnetix vdb fixes CVE-2023-53311

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-53311/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›