← All Advisories
Reported from OT-Advisories.com as of

Linux Kernel f2fs Decrements nr_pages in f2fs_write_end_io() and Triggers a Use-After-Free

Last refreshed2026-11-16

Status: UPDATED  |  Advisory ID: CVE-2026-31715

Key Details

CVECVE-2026-31715
CVSS Score / Version
7.8 (High) / CVSS v3.1
Updated2026-11-11
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Prose
attack vector is local; attack complexity is low; privileges required is low; user interaction is none; scope is unchanged; confidentiality impact is high; integrity impact is high; availability impact is high.
Affected products
Linux Kernel
Classified as
CWE-416 (Use After Free)
Exploitation prediction (EPSS)
0.12% probability of exploitation in the next 30 days (2% percentile) -- FIRST.org's EPSS model.

Affected Products, Subsystems & Sectors

VendorProductAffected VersionsPatch Status
LinuxLinux Kernel
SubsystemsOT Supporting Infrastructure
SectorsAll Sectors

What to Know

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

f2fs: fix UAF caused by decrementing sbi->nr_pages[] in f2fs_write_end_io()

The xfstests case "generic/107" and syzbot have both reported a NULL

pointer dereference.

The concurrent scenario that triggers the panic is as follows:

F2FS_WB_CP_DATA write callback umount

- f2fs_write_checkpoint

- f2fs_wait_on_all_pages(sbi, F2FS_WB_CP_DATA)

- blk_mq_end_request

- bio_endio

- f2fs_write_end_io

: dec_page_count(sbi, F2FS_WB_CP_DATA)

: wake_up(&sbi->cp_wait)

- kill_f2fs_super

- kill_block_super

- f2fs_put_super

: iput(sbi->node_inode)

: sbi->node_inode = NULL

: f2fs_in_warm_node_list

- is_node_folio // sbi->node_inode is NULL and panic

The root cause is that f2fs_put_super() calls iput(sbi->node_inode) and

sets sbi->node_inode to NULL after sbi->nr_pages[F2FS_WB_CP_DATA] is

decremented to zero. As a result, f2fs_in_warm_node_list() may

dereference a NULL node_inode when checking whether a folio belongs to

the node inode, leading to a panic.

This patch fixes the issue by calling f2fs_in_warm_node_list() before

decrementing sbi->nr_pages[F2FS_WB_CP_DATA], thus preventing the

use-after-free condition. (NVD)

What to Do

Monitor Linux's web page for any future patch releases.

References

SourceReference
NVDhttps://nvd.nist.gov/vuln/detail/CVE-2026-31715
CVEhttps://www.cve.org/CVERecord?id=CVE-2026-31715
Report compilation © 2026 OT-Advisories.com  ·  CC BY 4.0  ·  Source materials remain the property of their respective publishers as cited.