# CVE-2023-53804: nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-02)
- Published: 2025-12-09T00:01:01.787Z
- Modified: 2026-08-05T09:16:07.269Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()

During unmount process of nilfs2, nothing holds nilfs_root structure after
nilfs2 detaches its writer in nilfs_detach_log_writer().  However, since
nilfs_evict_inode() uses nilfs_root for some cleanup operations, it may
cause use-after-free read if inodes are left in "garbage_list" and
released by nilfs_dispose_list() at the end of nilfs_detach_log_writer().

Fix this issue by modifying nilfs_evict_inode() to only clear inode
without additional metadata changes that use nilfs_root if the file system
is degraded to read-only or the writer is detached.

(As written by CVE List.)

## Affected

- Linux Linux: from e912a5b66837ee89fb025e67b5efeaa11930c2ce before f31e18131ee2ce80a4da5c808221d25b1ae9ad6d; from e912a5b66837ee89fb025e67b5efeaa11930c2ce before 2a782ea8ebd712a458466e3103e2881b4f886cb5; from e912a5b66837ee89fb025e67b5efeaa11930c2ce before 116d53f09ff52e6f98e3fe1f85d8898d6ba26c68; from e912a5b66837ee89fb025e67b5efeaa11930c2ce before 6b4205ea97901f822004e6c8d59484ccfda03faa; from e912a5b66837ee89fb025e67b5efeaa11930c2ce before b8427b8522d9ede53015ba45a9978ba68d1162f5; from e912a5b66837ee89fb025e67b5efeaa11930c2ce before acc2a40e428f12780004e1e9fce4722d88f909fd; from e912a5b66837ee89fb025e67b5efeaa11930c2ce before fb8e8d58f116d069e5939e1f786ac84e7fa4533e; from e912a5b66837ee89fb025e67b5efeaa11930c2ce before 9b5a04ac3ad9898c4745cba46ea26de74ba56a8e; 2.6.37 (not affected: before 2.6.37; from 4.14.316 up to 4.14.*; from 4.19.284 up to 4.19.*; from 5.4.244 up to 5.4.*; from 5.10.181 up to 5.10.*; from 5.15.113 up to 5.15.*; from 6.1.30 up to 6.1.*; from 6.3.4 up to 6.3.*; from 6.4 up to *)

## References

- <https://git.kernel.org/stable/c/f31e18131ee2ce80a4da5c808221d25b1ae9ad6d>
- <https://git.kernel.org/stable/c/2a782ea8ebd712a458466e3103e2881b4f886cb5>
- <https://git.kernel.org/stable/c/116d53f09ff52e6f98e3fe1f85d8898d6ba26c68>
- <https://git.kernel.org/stable/c/6b4205ea97901f822004e6c8d59484ccfda03faa>
- <https://git.kernel.org/stable/c/b8427b8522d9ede53015ba45a9978ba68d1162f5>
- <https://git.kernel.org/stable/c/acc2a40e428f12780004e1e9fce4722d88f909fd>
- <https://git.kernel.org/stable/c/fb8e8d58f116d069e5939e1f786ac84e7fa4533e>
- <https://git.kernel.org/stable/c/9b5a04ac3ad9898c4745cba46ea26de74ba56a8e>

## Sources

- CVE List: [CVE-2023-53804](https://www.cve.org/CVERecord?id=CVE-2023-53804), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2023-53804](https://nvd.nist.gov/vuln/detail/CVE-2023-53804), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2023-53804 · Whole record: https://cve.day/CVE-2023-53804.json · Rebuilt by cve.day 2026-11-25T22:58:35.061Z
