CVE-2025-38333 (GCVE-0-2025-38333)

Vulnerability from cvelistv5 – Published: 2025-07-10 08:15 – Updated: 2026-08-05 12:01
VLAI
Title
f2fs: fix to bail out in get_new_segment()
Summary
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to bail out in get_new_segment() ------------[ cut here ]------------ WARNING: CPU: 3 PID: 579 at fs/f2fs/segment.c:2832 new_curseg+0x5e8/0x6dc pc : new_curseg+0x5e8/0x6dc Call trace: new_curseg+0x5e8/0x6dc f2fs_allocate_data_block+0xa54/0xe28 do_write_page+0x6c/0x194 f2fs_do_write_node_page+0x38/0x78 __write_node_page+0x248/0x6d4 f2fs_sync_node_pages+0x524/0x72c f2fs_write_checkpoint+0x4bc/0x9b0 __checkpoint_and_complete_reqs+0x80/0x244 issue_checkpoint_thread+0x8c/0xec kthread+0x114/0x1bc ret_from_fork+0x10/0x20 get_new_segment() detects inconsistent status in between free_segmap and free_secmap, let's record such error into super block, and bail out get_new_segment() instead of continue using the segment.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 , < f0023d7a2a86999c8e1300e911d92f995a5310a8 (git)
Affected: 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 , < ca860f507a61c7c3d4dde47b830a5c0d555cf83c (git)
Affected: 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 , < bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2 (git)
Create a notification for this product.
Linux Linux Affected: 3.8
Unaffected: 0 , < 3.8 (semver)
Unaffected: 6.12.35 , ≤ 6.12.* (semver)
Unaffected: 6.15.4 , ≤ 6.15.* (semver)
Unaffected: 6.16 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/f2fs/segment.c",
            "include/linux/f2fs_fs.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f0023d7a2a86999c8e1300e911d92f995a5310a8",
              "status": "affected",
              "version": "98e4da8ca301e062d79ae168c67e56f3c3de3ce4",
              "versionType": "git"
            },
            {
              "lessThan": "ca860f507a61c7c3d4dde47b830a5c0d555cf83c",
              "status": "affected",
              "version": "98e4da8ca301e062d79ae168c67e56f3c3de3ce4",
              "versionType": "git"
            },
            {
              "lessThan": "bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2",
              "status": "affected",
              "version": "98e4da8ca301e062d79ae168c67e56f3c3de3ce4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/f2fs/segment.c",
            "include/linux/f2fs_fs.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.8"
            },
            {
              "lessThan": "3.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.35",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.35",
                  "versionStartIncluding": "3.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.4",
                  "versionStartIncluding": "3.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "3.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to bail out in get_new_segment()\n\n------------[ cut here ]------------\nWARNING: CPU: 3 PID: 579 at fs/f2fs/segment.c:2832 new_curseg+0x5e8/0x6dc\npc : new_curseg+0x5e8/0x6dc\nCall trace:\n new_curseg+0x5e8/0x6dc\n f2fs_allocate_data_block+0xa54/0xe28\n do_write_page+0x6c/0x194\n f2fs_do_write_node_page+0x38/0x78\n __write_node_page+0x248/0x6d4\n f2fs_sync_node_pages+0x524/0x72c\n f2fs_write_checkpoint+0x4bc/0x9b0\n __checkpoint_and_complete_reqs+0x80/0x244\n issue_checkpoint_thread+0x8c/0xec\n kthread+0x114/0x1bc\n ret_from_fork+0x10/0x20\n\nget_new_segment() detects inconsistent status in between free_segmap\nand free_secmap, let\u0027s record such error into super block, and bail\nout get_new_segment() instead of continue using the segment."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - get_new_segment() is reached only through the f2fs allocator on a locally mounted volume \u2014 ordinary writes, fsync, GC, or the background checkpoint thread; there is no network-facing consumer of this code.\nAC:L - Once the free_segmap/free_secmap divergence exists \u2014 from attacker-supplied on-disk metadata on removable f2fs media or the in-kernel state divergence observed in the field \u2014 the condition is hit deterministically on the next allocation from that section, with no race window or memory layout the attacker must win.\nPR:L - On an already-mounted f2fs volume (Android /data, auto-mounted SD/USB), any unprivileged local user with write access drives segment allocation via normal file writes and fsync; no capability or CAP_SYS_ADMIN is needed for the trigger itself.\nUI:N - The reported failure fires on the background checkpoint kthread during ordinary operation on an already-mounted filesystem, and removable f2fs media are auto-mounted by vold/udisks2 without any action by another user.\nS:U - The corruption is confined to the kernel/f2fs security authority on the same host; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The already-in-use segment is handed out as a new current segment starting at block offset 0, so the same physical blocks become mapped by two different inodes and a reader of one file obtains blocks written for another user\u0027s file on a shared filesystem.\nI:H - Live data and node blocks belonging to other files are physically overwritten, SIT valid_blocks/cur_valid_map are corrupted, and the underflowed free_segments count is persisted into the on-disk checkpoint (ckpt-\u003efree_segment_count is never validated on read), so the damage survives reboot.\nA:H - With CONFIG_F2FS_CHECK_FS the f2fs_bug_on is a plain BUG_ON taken while holding free_i-\u003esegmap_lock on the checkpoint kthread \u2014 an immediate panic; otherwise the free_segments/free_sections underflow defeats GC accounting and the downstream f2fs_bug_on()s and -ENOSPC path end in f2fs_stop_checkpoint(), shutting the filesystem down."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:01:11.722Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f0023d7a2a86999c8e1300e911d92f995a5310a8"
        },
        {
          "url": "https://git.kernel.org/stable/c/ca860f507a61c7c3d4dde47b830a5c0d555cf83c"
        },
        {
          "url": "https://git.kernel.org/stable/c/bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2"
        }
      ],
      "title": "f2fs: fix to bail out in get_new_segment()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38333",
    "datePublished": "2025-07-10T08:15:05.768Z",
    "dateReserved": "2025-04-16T04:51:24.005Z",
    "dateUpdated": "2026-08-05T12:01:11.722Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-38333",
      "date": "2026-08-05",
      "epss": "0.00154",
      "percentile": "0.05106"
    },
    "microsoft_vex": {
      "current_release_date": "2026-06-28T02:01:28.000Z",
      "cve": "CVE-2025-38333",
      "id": "msrc_CVE-2025-38333",
      "initial_release_date": "2025-07-02T00:00:00.000Z",
      "product_status:known_affected": "16",
      "product_status:known_not_affected": "1",
      "product_status:under_investigation": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "f2fs: fix to bail out in get_new_segment()",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-38333.json",
      "version": "16"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-38333\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-07-10T09:15:27.827\",\"lastModified\":\"2026-07-30T06:23:07.613\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nf2fs: fix to bail out in get_new_segment()\\n\\n------------[ cut here ]------------\\nWARNING: CPU: 3 PID: 579 at fs/f2fs/segment.c:2832 new_curseg+0x5e8/0x6dc\\npc : new_curseg+0x5e8/0x6dc\\nCall trace:\\n new_curseg+0x5e8/0x6dc\\n f2fs_allocate_data_block+0xa54/0xe28\\n do_write_page+0x6c/0x194\\n f2fs_do_write_node_page+0x38/0x78\\n __write_node_page+0x248/0x6d4\\n f2fs_sync_node_pages+0x524/0x72c\\n f2fs_write_checkpoint+0x4bc/0x9b0\\n __checkpoint_and_complete_reqs+0x80/0x244\\n issue_checkpoint_thread+0x8c/0xec\\n kthread+0x114/0x1bc\\n ret_from_fork+0x10/0x20\\n\\nget_new_segment() detects inconsistent status in between free_segmap\\nand free_secmap, let\u0027s record such error into super block, and bail\\nout get_new_segment() instead of continue using the segment.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: f2fs: correcci\u00f3n para salir en get_new_segment() ------------[ cortar aqu\u00ed ]------------ ADVERTENCIA: CPU: 3 PID: 579 at fs/f2fs/segment.c:2832 new_curseg+0x5e8/0x6dc pc : new_curseg+0x5e8/0x6dc Call trace: new_curseg+0x5e8/0x6dc f2fs_allocate_data_block+0xa54/0xe28 do_write_page+0x6c/0x194 f2fs_do_write_node_page+0x38/0x78 __write_node_page+0x248/0x6d4 f2fs_sync_node_pages+0x524/0x72c f2fs_write_checkpoint+0x4bc/0x9b0 __checkpoint_and_complete_reqs+0x80/0x244 issue_checkpoint_thread+0x8c/0xec kthread+0x114/0x1bc ret_from_fork+0x10/0x20 get_new_segment() detecta un estado inconsistente entre free_segmap y free_secmap, registremos dicho error en el superbloque y rescatemos get_new_segment() en lugar de continuar usando el segmento.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/f2fs/segment.c\",\"include/linux/f2fs_fs.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"98e4da8ca301e062d79ae168c67e56f3c3de3ce4\",\"lessThan\":\"f0023d7a2a86999c8e1300e911d92f995a5310a8\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"98e4da8ca301e062d79ae168c67e56f3c3de3ce4\",\"lessThan\":\"ca860f507a61c7c3d4dde47b830a5c0d555cf83c\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"98e4da8ca301e062d79ae168c67e56f3c3de3ce4\",\"lessThan\":\"bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/f2fs/segment.c\",\"include/linux/f2fs_fs.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"3.8\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"3.8\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.35\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.15.4\",\"lessThanOrEqual\":\"6.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.16\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"NVD-CWE-noinfo\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"3.8\",\"versionEndExcluding\":\"6.12.35\",\"matchCriteriaId\":\"51D4EF45-6311-417A-88AB-8B1FA4105DC3\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.13\",\"versionEndExcluding\":\"6.15.4\",\"matchCriteriaId\":\"DFD174C5-1AA2-4671-BDDC-1A9FCC753655\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/ca860f507a61c7c3d4dde47b830a5c0d555cf83c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/f0023d7a2a86999c8e1300e911d92f995a5310a8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:32:34+00:00",
      "cve": "CVE-2025-38333",
      "id": "CVE-2025-38333",
      "initial_release_date": "2025-07-10T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: f2fs: fix to bail out in get_new_segment()",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-38333.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-07-31T01:10:40Z",
      "cve": "CVE-2025-38333",
      "id": "CVE-2025-38333",
      "initial_release_date": "2025-07-10T23:22:21Z",
      "product_status:known_not_affected": "470",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-38333",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-38333.json",
      "version": "10"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…