Zero Day MonitorZDM
DashboardVulnerabilitiesTrendingZero-DaysNewsAbout
Login
ImpressumPrivacy Policy
Zero Day Monitor © 2026
2067 articles · 154829 vulns · 36/41 feeds (7d)
← Back to list
—
CVE-2026-31702EXPLOITEDPATCHED
linux · linux_kernel

f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()

Description

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.

Affected Products

VendorProductVersions
linuxlinux_kernel4c8ff7095bef64fc47e996a938f7d57f9e077da3, 4c8ff7095bef64fc47e996a938f7d57f9e077da3, 4c8ff7095bef64fc47e996a938f7d57f9e077da3, 4c8ff7095bef64fc47e996a938f7d57f9e077da3, 4c8ff7095bef64fc47e996a938f7d57f9e077da3, 5.6, 6.6.135, 6.12.83, 6.18.24, 7.0.1

Also Affects

Downstream vendors/products affected by this vulnerability

VendorProductSourceConfidence
open sourceopen source linux kernelcert_advisory90%

References

  • https://git.kernel.org/stable/c/ef57cd3329b40c739b9a2e1a8a21ecc4171c6280
  • https://git.kernel.org/stable/c/f5154cf3ce1c8193f0c1891d3769f62740cfe6fe
  • https://git.kernel.org/stable/c/c76cf339b87975ae5b2c06d2d774d5667d25a12a
  • https://git.kernel.org/stable/c/2c97dcb6147c8f7f25c629b93be1e69617de5d4a
  • https://git.kernel.org/stable/c/39d4ee19c1e7d753dd655aebee632271b171f43a

Related News (4 articles)

Tier A
Microsoft MSRC2d ago
CVE-2026-31702 f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()
→ No new info (linked only)
Tier B
BSI Advisories17d ago
[NEU] [mittel] Linux Kernel: Mehrere Schwachstellen
→ No new info (linked only)
Tier C
VulDB19d ago
CVE-2026-31702 | 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
→ No new info (linked only)
Tier C
Linux Kernel CVEs19d ago
CVE-2026-31702: f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()
→ No new info (linked only)
CISA KEV❌ No
Actively exploited✅ Yes
Patch available
ef57cd3329b40c739b9a2e1a8a21ecc4171c6280f5154cf3ce1c8193f0c1891d3769f62740cfe6fec76cf339b87975ae5b2c06d2d774d5667d25a12a2c97dcb6147c8f7f25c629b93be1e69617de5d4a39d4ee19c1e7d753dd655aebee632271b171f43a06.6.1366.12.846.18.257.0.27.1-rc1
PublishedMay 1, 2026
Last enriched19d agov2
Trending Score49
Source articles4
Independent4
Info Completeness7/14
Missing: cvss, epss, cwe, kev, exploit, iocs, mitre_attack

Community Vote

0
Login to vote
0 upvotes0 downvotes
No votes yet

Related CVEs (5)

HIGHCVE-2026-31431EXPKEV
crypto: algif_aead - Revert to operating out-of-place
Trending: 143
HIGHCVE-2026-43284EXPKEV
xfrm: esp: avoid in-place decrypt on shared skb frags
Trending: 141
CRITICALCVE-2026-43500EXPKEV
rxrpc: Also unshare DATA/RESPONSE packets when paged frags are present
Trending: 132
HIGHCVE-2026-46333EXP
ptrace: slightly saner 'get_dumpable()' logic
Trending: 91
CRITICALCVE-2026-43493EXP
crypto: pcrypt - Fix handling of MAY_BACKLOG requests
Trending: 60

Pin to Dashboard

Verification

State: unverified
Confidence: 0%

Vulnerability Timeline

CVE Published
May 1, 2026
Actively Exploited
May 1, 2026
Patch Available
May 1, 2026
Discovered by ZDM
May 1, 2026
Updated: severity, affectedVersions, activelyExploited
May 1, 2026

Version History

v2
Last enriched 19d ago
v2Tier C19d ago

Updated severity to CRITICAL, added new affected versions, and noted that no exploit is available.

severityaffectedVersionsactivelyExploited
via VulDB
v119d ago

Initial creation