Linux Kernel up to 6.18.24/7.0.1 f2fs_write_end_io nr_pages[] use after free

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.7 | $5k-$25k | 0.00 |
Summary
A vulnerability described as critical has been identified in Linux Kernel up to 6.18.24/7.0.1. Impacted is the function f2fs_write_end_io. Such manipulation of the argument nr_pages[] leads to use after free.
This vulnerability is documented as CVE-2026-31715. There is not any exploit available.
Upgrading the affected component is recommended.
Details
A vulnerability, which was classified as critical, has been found in Linux Kernel up to 6.18.24/7.0.1. Affected by this issue is the function f2fs_write_end_io. The manipulation of the argument nr_pages[] with an unknown input leads to a use after free vulnerability. Using CWE to declare the problem leads to CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. Impacted is confidentiality, integrity, and availability. CVE summarizes:
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.
The advisory is shared for download at git.kernel.org. This vulnerability is handled as CVE-2026-31715 since 03/09/2026. The exploitation is known to be easy. There are known technical details, but no exploit is available. The current price for an exploit might be approx. USD $5k-$25k (estimation calculated on 07/05/2026).
The vulnerability scanner Nessus provides a plugin with the ID 325059 (Debian dla-4665 : affs-modules-6.1.0-48-4kc-malta-di - security update), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 6.18.25, 7.0.2 or 7.1-rc1 eliminates this vulnerability. Applying the patch 963d2e24d9d92a31e6773b0f642214f10013ebf7/188bb65f247a7a7c62f287c9a263aee3cad96fa5/2d9c4a4ed4eef1f82c5b16b037aee8bad819fd53 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (325059) and CERT Bund (WID-SEC-2026-1346). Once again VulDB remains the best source for vulnerability data.
Affected
- Google Container-Optimized OS
- Debian Linux
- Amazon Linux 2
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- SUSE openSUSE
- Open Source Linux Kernel
- RESF Rocky Linux
- Microsoft Azure Linux
- Red Hat OpenShift
Product
Type
Vendor
Name
Version
- 6.18.0
- 6.18.1
- 6.18.2
- 6.18.3
- 6.18.4
- 6.18.5
- 6.18.6
- 6.18.7
- 6.18.8
- 6.18.9
- 6.18.10
- 6.18.11
- 6.18.12
- 6.18.13
- 6.18.14
- 6.18.15
- 6.18.16
- 6.18.17
- 6.18.18
- 6.18.19
- 6.18.20
- 6.18.21
- 6.18.22
- 6.18.23
- 6.18.24
- 7.0.0
- 7.0.1
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.9VulDB Meta Temp Score: 7.7
VulDB Base Score: 8.0
VulDB Temp Score: 7.6
VulDB Vector: 🔒
VulDB Reliability: 🔍
NVD Base Score: 7.8
NVD Vector: 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Use after freeCWE: CWE-416 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: Partially
Local: Yes
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 325059
Nessus Name: Debian dla-4665 : affs-modules-6.1.0-48-4kc-malta-di - security update
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Kernel 6.18.25/7.0.2/7.1-rc1
Patch: 963d2e24d9d92a31e6773b0f642214f10013ebf7/188bb65f247a7a7c62f287c9a263aee3cad96fa5/2d9c4a4ed4eef1f82c5b16b037aee8bad819fd53
Timeline
03/09/2026 CVE reserved05/01/2026 Advisory disclosed
05/01/2026 VulDB entry created
07/05/2026 VulDB entry last update
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2026-31715 (🔒)
GCVE (CVE): GCVE-0-2026-31715
GCVE (VulDB): GCVE-100-360596
CERT Bund: WID-SEC-2026-1346 - Linux Kernel: Mehrere Schwachstellen
Entry
Created: 05/01/2026 16:48Updated: 07/05/2026 22:05
Changes: 05/01/2026 16:48 (59), 05/05/2026 04:26 (7), 05/17/2026 23:25 (11), 06/30/2026 21:48 (3), 07/05/2026 22:05 (2)
Complete: 🔍
Cache ID: 216::103
Once again VulDB remains the best source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.