CVE-2026-31715
Use-After-Free in F2FS Linux Kernel
Publication date: 2026-05-01
Last updated on: 2026-05-17
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 7.1 |
| linux | linux_kernel | From 6.19 (inc) to 7.0.2 (exc) |
| linux | linux_kernel | From 4.19 (inc) to 6.18.25 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-416 | The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a use-after-free (UAF) issue in the Linux kernel's f2fs filesystem. It occurs because the function f2fs_put_super() calls iput() on sbi->node_inode and then sets sbi->node_inode to NULL after decrementing sbi->nr_pages[F2FS_WB_CP_DATA] to zero. Subsequently, the function f2fs_in_warm_node_list() may attempt to dereference this now NULL node_inode pointer, leading to a kernel panic.
The problem arises in a concurrent scenario involving write callbacks and unmount operations, where the order of operations causes the use-after-free condition. The fix involves changing the order of operations by calling f2fs_in_warm_node_list() before decrementing sbi->nr_pages[F2FS_WB_CP_DATA], preventing the NULL pointer dereference.
How can this vulnerability impact me? :
This vulnerability can cause the Linux kernel to panic due to a NULL pointer dereference, leading to a system crash. Such a crash can result in denial of service, data loss, or system instability, especially on systems using the f2fs filesystem.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is fixed by a patch that changes the order of operations in the f2fs filesystem code to prevent a use-after-free condition. Immediate mitigation involves updating the Linux kernel to a version that includes this fix.
- Apply the patch or upgrade to a Linux kernel version released after 2026-05-01 that contains the fix for the f2fs use-after-free issue.
- Avoid unmounting f2fs filesystems during heavy write operations until the fix is applied, as the panic occurs during concurrent write and unmount operations.