CVE-2026-31702: Linux kernel · f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()
Affects Linux kernelSource GCVE Database
Mentioned vulnerabilities
Not known to be exploited · CVSS 7.8 High · fixed in 7.0.0-27.27 : patch Linux kernel soon.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 0.1% chance of exploitation in 30 days – higher than 1% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 7.0.0-27.27, 7.0.0-1008.8, 7.0.0-1007.7 +4
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 1 May 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.04 LTSlinuxpkg:deb/ubuntu/linux@7.0.0-27.27?arch=source&distro=resoluteOther threats | Affected
| Fixed in
|
Ubuntu 26.04 LTSlinux-awspkg:deb/ubuntu/linux-aws@7.0.0-1008.8?arch=source&distro=resoluteOther threats | Affected
| Fixed in
|
Ubuntu 26.04 LTSlinux-azurepkg:deb/ubuntu/linux-azure@7.0.0-1009.9?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSlinux-azure-fdepkg:deb/ubuntu/linux-azure-fde@7.0.0-1008.8?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSlinux-gcppkg:deb/ubuntu/linux-gcp@7.0.0-1007.7?arch=source&distro=resoluteOther threats | Affected
| Fixed in
|
Ubuntu 26.04 LTSlinux-ibmpkg:deb/ubuntu/linux-ibm@7.0.0-1009.9?arch=source&distro=resoluteOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available and has been released by Ubuntu as part of their kernel updates. Users should apply the latest kernel updates for their distribution and reboot the system to ensure the fix is applied. The update involves a kernel ABI change, so recompilation and reinstallation of third-party kernel modules may be necessary. No additional mitigations are specified beyond applying the official fix.
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.
References
- ubuntu.com/security/CVE-2026-31702 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-31702 (opens in a new tab)
- git.kernel.org/linus/39d4ee19c1e7d753dd655aebee632271b171f43a (opens in a new tab)
- ubuntu.com/security/notices/USN-8488-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8488-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8507-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8569-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8567-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8574-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8574-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8595-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8596-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8603-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8595-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8606-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8607-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8608-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8609-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8574-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-8595-3 (opens in a new tab)