CVE-2023-53311
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-headers | Amazon Linux | 4.14.326-245.539.amzn2 |
| kernel-devel | Amazon Linux | 4.14.326-245.539.amzn2 |
| kernel | Amazon Linux | 6.1.49-69.116.amzn2023 |
| kernel-tools-devel | Amazon Linux | 6.1.49-69.116.amzn2023 |
| python3-perf | Amazon Linux | 6.1.49-69.116.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 6.1.49-69.116.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8, 0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8, 0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8 |
| Linux | Linux | 4.0, 0, 4.14.323 |
| amazon:2 | kernel-headers | 0 |
| amazon:2 | kernel-devel | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| linux | linux_kernel | 4.0, 4.0, 4.0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2 | kernel-livepatch-4.14.326-245.539 | 0 |
| amazon:2 | kernel-tools | 0 |
| amazon:2 | kernel | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| Linux | Linux | 0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8, 5.10.191, 4.14.323 |
| amazon:2023 | perf | 0 |
| amazon:2 | python-perf | 0 |
| amazon:2 | kernel-tools-devel | 0 |
…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