CVE-2025-38218
BaseFortify
Publication date: 2025-07-04
Last updated on: 2025-12-18
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 3.8 (inc) to 5.10.239 (exc) |
| linux | linux_kernel | From 5.11 (inc) to 5.15.186 (exc) |
| linux | linux_kernel | From 5.16 (inc) to 6.1.142 (exc) |
| linux | linux_kernel | From 6.2 (inc) to 6.6.95 (exc) |
| linux | linux_kernel | From 6.7 (inc) to 6.12.35 (exc) |
| linux | linux_kernel | From 6.13 (inc) to 6.15.4 (exc) |
| debian | debian_linux | 11.0 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-NVD-CWE-noinfo |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is in the Linux kernel's f2fs filesystem implementation. It occurs because the sit_bitmap_size is not properly checked, leading to an out-of-bound access when resizing an f2fs image. This causes inconsistent metadata and can trigger a kernel panic when mounting the corrupted image. The issue arises because the sit_bitmap size is smaller than the number of sit blocks, causing invalid memory access and a kernel bug. A sanity check was added to prevent this panic.
How can this vulnerability impact me? :
If exploited, this vulnerability can cause a kernel panic when mounting an f2fs filesystem image that has been resized improperly. This results in system crashes and potential denial of service, as the kernel encounters corrupted metadata and invalid memory access.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by attempting to reproduce the conditions that trigger the kernel panic related to the f2fs filesystem. The provided testcase commands are: 1. touch img 2. truncate -s $((512*1024*1024*1024)) img 3. mkfs.f2fs -f img $((256*1024*1024)) 4. resize.f2fs -s -i img -t $((1024*1024*1024)) 5. mount img /mnt/f2fs If mounting the image triggers a kernel panic with messages similar to the provided kernel BUG trace, the system is vulnerable.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include applying the patch that adds a sanity check in f2fs_sanity_check_ckpt() to prevent the kernel panic. Until the patch is applied, avoid resizing f2fs images in a way that triggers the out-of-boundary access, and avoid mounting images created or resized with the problematic parameters. Monitoring for kernel panic logs related to f2fs can also help in early detection.