cve.bz

CVE-2025-38218

5.5 mediumEPSS 0.2%Fix available

Medium (5.5). EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to do sanity check on sit_bitmap_size w/ below testcase, resize will generate a corrupted image which contains inconsistent metadata, so when mounting such image, it will trigger kernel panic: touch img truncate -s $((512*1024*1024*1024)) img mkfs.f2fs -f img $((256*1024*1024)) resize.f2fs -s -i img -t $((1024*1024*1024)) mount img /mnt/f2fs ------------[ cut here ]------------ kernel BUG at fs/f2fs/segment.h:863! Oops: invalid opcode: 0000 [#1] SMP PTI CPU: 11 UID: 0 PID: 3922 Comm: mount Not tainted 6.15.0-rc1+ #191 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:f2fs_ra_meta_pages+0x47c/0x490 Call Trace: f2fs_build_segment_manager+0x11c3/0x2600 f2fs_fill_super+0xe97/0x2840 mount_bdev+0xf4/0x140 legacy_get_tree+0x2b/0x50 vfs_get_tree+0x29/0xd0 path_mount+0x487/0xaf0 __x64_sys_mount+0x116/0x150 do_syscall_64+0x82/0x190 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fdbfde1bcfe The reaseon is: sit_i->bitmap_size is 192, so size of sit bitmap is 192*8=1536, at maximum there are 1536 sit blocks, however MAIN_SEGS is 261893, so that sit_blk_cnt is 4762, build_sit_entries() -> current_sit_addr() tries to access out-of-boundary in sit_bitmap at offset from [1536, 4762), once sit_bitmap and sit_bitmap_mirror is not the same, it will trigger f2fs_bug_on(). Let's add sanity check in f2fs_sanity_check_ckpt() to avoid panic.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 9th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-38218 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-38218?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-38218?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-38218 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux3.8 and later

Fixed in

ProductRelease lineFixed in
Linux5.105.10.239
Linux5.155.15.186
Linux6.16.1.142
Linux6.66.6.95
Linux6.126.12.35
Linux6.156.15.4
Linuxlater releases6.16

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux5.10.244-1DLA-4327-1
Debian11linux-6.16.1.153-1~deb11u1DLA-4328-1
Debian12linux6.1.147-1DEBIAN-CVE-2025-38218 DSA-5973-1
Debian13, 14linux6.12.35-1DEBIAN-CVE-2025-38218
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-38218
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-38218
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-38218
Ubuntu22.04:LTSlinux, linux-lowlatency5.15.0-156.166UBUNTU-CVE-2025-38218 USN-7774-1
Ubuntu22.04:LTSlinux-aws5.15.0-1092.99UBUNTU-CVE-2025-38218 USN-7774-1
Ubuntu22.04:LTSlinux-aws-6.8, linux-nvidia-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-38218 USN-8028-5
Ubuntu22.04:LTSlinux-azure5.15.0-1096.105UBUNTU-CVE-2025-38218 USN-7775-2
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-38218 USN-8126-1
Ubuntu22.04:LTSlinux-azure-fde5.15.0-1096.105.1UBUNTU-CVE-2025-38218
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1046.53~22.04.1UBUNTU-CVE-2025-38218
Ubuntu22.04:LTSlinux-gcp5.15.0-1092.101UBUNTU-CVE-2025-38218 USN-7774-1
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1047.50~22.04.2UBUNTU-CVE-2025-38218 USN-8031-1
70 more for Ubuntu in the JSON and on Ubuntu's page.
Azure Linux3kernel6.6.96.1-1AZL-64677
Alpaquita23linux-lts6.1.143-r1BELL-CVE-2025-38218
Alpaquita25linux-lts6.12.41-r0BELL-CVE-2025-38218
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-38218

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Alpaquita.

Red Hat

Red Hat rates this Low.

Red Hat's statement

This vulnerability has negligible impact on Red Hat Enterprise Linux as the Flash Friendly File System (F2FS) is not supported or enabled in standard Red Hat kernels. Exploitation requires mounting a crafted, malformed storage volume with inconsistent metadata, which necessitates elevated privileges such as root or CAP_SYS_ADMIN. Consequently, default enterprise deployments are not exposed to this flaw.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-38218.

References

Check your stackJSON