CVE-2023-53804 nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
A use-after-free bug in the nilfs2 filesystem allows attackers to cause denial of service or potentially execute code during unmount operations.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-53804?
CVE-2023-53804 is a high-severity use after free vulnerability in Linux, published on 9 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2023-53804?
How do I fix CVE-2023-53804?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2023-53804 being exploited?
There is no known exploitation of CVE-2023-53804 in the wild and no public exploit code.
Sources
Also known as BELL-CVE-2023-53804, DEBIAN-CVE-2023-53804, GHSA-wf2j-c3q8-8c84, UBUNTU-CVE-2023-53804.