Linux Kernel up to 6.6.135/6.12.83/6.18.24/7.0.1 data.c f2fs_compress_write_end_io use after free

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.7$0-$5k0.00

Summaryinfo

A vulnerability classified as critical was found in Linux Kernel up to 6.6.135/6.12.83/6.18.24/7.0.1. This issue affects the function f2fs_compress_write_end_io of the file data.c. Such manipulation leads to use after free. This vulnerability is traded as CVE-2026-31702. There is no exploit available. Upgrading the affected component is advised.

Detailsinfo

A vulnerability was found in Linux Kernel up to 6.6.135/6.12.83/6.18.24/7.0.1. It has been rated as critical. Affected by this issue is the function f2fs_compress_write_end_io of the file data.c. The manipulation 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 use-after-free of sbi in f2fs_compress_write_end_io() In f2fs_compress_write_end_io(), dec_page_count(sbi, type) can bring the F2FS_WB_CP_DATA counter to zero, unblocking f2fs_wait_on_all_pages() in f2fs_put_super() on a concurrent unmount CPU. The unmount path then proceeds to call f2fs_destroy_page_array_cache(sbi), which destroys sbi->page_array_slab via kmem_cache_destroy(), and eventually kfree(sbi). Meanwhile, the bio completion callback is still executing: when it reaches page_array_free(sbi, ...), it dereferences sbi->page_array_slab — a destroyed slab cache — to call kmem_cache_free(), causing a use-after-free. This is the same class of bug as CVE-2026-23234 (which fixed the equivalent race in f2fs_write_end_io() in data.c), but in the compressed writeback completion path that was not covered by that fix. Fix this by moving dec_page_count() to after page_array_free(), so that all sbi accesses complete before the counter decrement that can unblock unmount. For non-last folios (where atomic_dec_return on cic->pending_pages is nonzero), dec_page_count is called immediately before returning — page_array_free is not reached on this path, so there is no post-decrement sbi access. For the last folio, page_array_free runs while the F2FS_WB_CP_DATA counter is still nonzero (this folio has not yet decremented it), keeping sbi alive, and dec_page_count runs as the final operation.

The advisory is shared for download at git.kernel.org. This vulnerability is handled as CVE-2026-31702 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 $0-$5k (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.6.136, 6.12.84, 6.18.25, 7.0.2 or 7.1-rc1 eliminates this vulnerability. Applying the patch ef57cd3329b40c739b9a2e1a8a21ecc4171c6280/f5154cf3ce1c8193f0c1891d3769f62740cfe6fe/c76cf339b87975ae5b2c06d2d774d5667d25a12a/2c97dcb6147c8f7f25c629b93be1e69617de5d4a/39d4ee19c1e7d753dd655aebee632271b171f43a 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). VulDB is the best source for vulnerability data and more expert information about this specific topic.

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

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.9
VulDB 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: 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Use after free
CWE: 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-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 325059
Nessus Name: Debian dla-4665 : affs-modules-6.1.0-48-4kc-malta-di - security update

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Kernel 6.6.136/6.12.84/6.18.25/7.0.2/7.1-rc1
Patch: ef57cd3329b40c739b9a2e1a8a21ecc4171c6280/f5154cf3ce1c8193f0c1891d3769f62740cfe6fe/c76cf339b87975ae5b2c06d2d774d5667d25a12a/2c97dcb6147c8f7f25c629b93be1e69617de5d4a/39d4ee19c1e7d753dd655aebee632271b171f43a

Timelineinfo

03/09/2026 CVE reserved
05/01/2026 +52 days Advisory disclosed
05/01/2026 +0 days VulDB entry created
07/05/2026 +65 days VulDB entry last update

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2026-31702 (🔒)
GCVE (CVE): GCVE-0-2026-31702
GCVE (VulDB): GCVE-100-360584
CERT Bund: WID-SEC-2026-1346 - Linux Kernel: Mehrere Schwachstellen

Entryinfo

Created: 05/01/2026 16:41
Updated: 07/05/2026 20:06
Changes: 05/01/2026 16:41 (59), 05/04/2026 14:10 (7), 06/04/2026 05:24 (11), 06/09/2026 10:07 (1), 06/30/2026 19:56 (3), 07/05/2026 20:06 (2)
Complete: 🔍
Cache ID: 216::103

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!