CVE-2023-54182
Use-After-Free in Linux Kernel f2fs Causes System Panic
Publication date: 2025-12-30
Last updated on: 2025-12-30
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | f2fs | * |
| linux | kernel | * |
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in the Linux kernel's f2fs filesystem occurs when mounting a multi-device image with the read-write option, but one of the secondary devices is set as read-only. The kernel did not correctly check the read-only condition for all devices, leading to an inconsistent mount status. This inconsistency can cause a kernel panic during later updates or writes to the filesystem. The fix involves introducing a function to check the read-only status of all devices and ensuring consistent read-write status during remount operations.
How can this vulnerability impact me? :
If you mount a multi-device f2fs filesystem with one device set as read-only but attempt to remount it as read-write, this vulnerability can cause the Linux kernel to panic, leading to system crashes and potential data loss or corruption during write operations.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
You can detect this vulnerability by checking if a multi-device f2fs filesystem is mounted with inconsistent read-write and read-only device statuses. Commands to help detect this include: 1. Use 'mount' to check f2fs mounts and their options. 2. Use 'blockdev --getro /dev/<device>' to check if any device is set as read-only. 3. Attempt remounting with 'mount -t f2fs -o remount,rw /mnt/f2fs' and observe warnings or errors. Example commands: - mkfs.f2fs -c /dev/zram1 /dev/zram0 -f - blockdev --setro /dev/zram1 - mount -t f2fs /dev/zram0 /mnt/f2fs - mount -t f2fs -o remount,rw /mnt/f2fs If the system panics or shows kernel BUG messages related to f2fs inline data writes, it indicates the vulnerability is present.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include ensuring that all devices in a multi-device f2fs mount are consistently set to read-write or read-only to avoid inconsistent mount status. Avoid remounting f2fs filesystems with mixed read-only and read-write devices. Applying the kernel patch that introduces the f2fs_dev_is_readonly() check in f2fs_remount() is necessary to prevent the panic caused by this issue.