FKIE_CVE-2026-139012

Vulnerability from fkie_nvd - Published: 2026-11-30 14:18 - Updated: 2026-11-30 14:18
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved: f2fs: compress: fix to handle race between truncate and writeback fsstress reports a kernel BUG in f2fs_truncate_partial_cluster(): kernel BUG at fs/f2fs/compress.c:1238! RIP: 0010:f2fs_truncate_partial_cluster+0x292/0x2a0 Call Trace: <TASK> f2fs_truncate+0xf6/0x210 f2fs_setattr+0x6b7/0x770 notify_change+0x33b/0x520 do_truncate+0xc2/0xf0 vfs_truncate+0x153/0x1d0 ksys_truncate+0x78/0xd0 __x64_sys_truncate+0x16/0x20 do_syscall_64+0xbe/0x540 The root cause is that Thread A (truncate) and Thread B (background writeback or fsync) can race as follows: Thread A Thread B - f2fs_setattr - f2fs_truncate - f2fs_truncate_blocks - f2fs_truncate_partial_cluster - f2fs_is_compressed_cluster return 1 - f2fs_write_cache_pages - f2fs_write_multi_pages - f2fs_write_raw_pages - f2fs_write_single_data_page dn.data_blkaddr != COMPRESS_ADDR (cluster converted to normal) - f2fs_prepare_compress_overwrite - f2fs_is_compressed_cluster return 0 - return 0 - f2fs_bug_on(sbi, err == 0): BUG! Writeback path does not acquire i_gc_rwsem or filemap_invalidate_lock. When a compressed cluster fails compression during writeback, it is overwritten with raw data blocks. If Thread A checked f2fs_is_compressed_cluster() before the conversion, but calls f2fs_prepare_compress_overwrite() after the conversion, f2fs_prepare_compress_overwrite() returns 0 because the cluster is no longer a compressed cluster. To fix this, remove the f2fs_bug_on() and retry checking the cluster status when f2fs_prepare_compress_overwrite() returns 0, so that it can fall back to f2fs_do_truncate_blocks() to handle it as a normal cluster.
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/f2fs/compress.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "3eae9d491339330d15c5a99e701d09646fb6e85c",
              "status": "affected",
              "version": "3265d3db1f16395cfc6b8ea9b31b4001d98d05ef",
              "versionType": "git"
            },
            {
              "lessThan": "c25c023fb531baf5e8ca57f2211aff6292506210",
              "status": "affected",
              "version": "3265d3db1f16395cfc6b8ea9b31b4001d98d05ef",
              "versionType": "git"
            },
            {
              "lessThan": "9c7b917ffdf4be38d7074ddc23a39b4fe23dc1f7",
              "status": "affected",
              "version": "3265d3db1f16395cfc6b8ea9b31b4001d98d05ef",
              "versionType": "git"
            },
            {
              "lessThan": "06e413468900775563b4c87169e28912c1855d30",
              "status": "affected",
              "version": "3265d3db1f16395cfc6b8ea9b31b4001d98d05ef",
              "versionType": "git"
            },
            {
              "lessThan": "305021c93f4457c56d899e858742860df7bf0b8b",
              "status": "affected",
              "version": "3265d3db1f16395cfc6b8ea9b31b4001d98d05ef",
              "versionType": "git"
            },
            {
              "lessThan": "c0d77acef537dd3f0b1dcf94c9d0a265936d4ba6",
              "status": "affected",
              "version": "3265d3db1f16395cfc6b8ea9b31b4001d98d05ef",
              "versionType": "git"
            },
            {
              "lessThan": "3e82f85a40e71c0023408994f600fe862b83688d",
              "status": "affected",
              "version": "3265d3db1f16395cfc6b8ea9b31b4001d98d05ef",
              "versionType": "git"
            },
            {
              "lessThan": "c0337e331b065074ce20e4258a578e07dd7e4083",
              "status": "affected",
              "version": "3265d3db1f16395cfc6b8ea9b31b4001d98d05ef",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/f2fs/compress.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.8"
            },
            {
              "lessThan": "5.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.275",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.226",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.193",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.117",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.63",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: compress: fix to handle race between truncate and writeback\n\nfsstress reports a kernel BUG in f2fs_truncate_partial_cluster():\n\nkernel BUG at fs/f2fs/compress.c:1238!\nRIP: 0010:f2fs_truncate_partial_cluster+0x292/0x2a0\nCall Trace:\n \u003cTASK\u003e\n f2fs_truncate+0xf6/0x210\n f2fs_setattr+0x6b7/0x770\n notify_change+0x33b/0x520\n do_truncate+0xc2/0xf0\n vfs_truncate+0x153/0x1d0\n ksys_truncate+0x78/0xd0\n __x64_sys_truncate+0x16/0x20\n do_syscall_64+0xbe/0x540\n\nThe root cause is that Thread A (truncate) and Thread B (background\nwriteback or fsync) can race as follows:\n\nThread A                             Thread B\n- f2fs_setattr\n - f2fs_truncate\n  - f2fs_truncate_blocks\n   - f2fs_truncate_partial_cluster\n    - f2fs_is_compressed_cluster\n      return 1\n                                     - f2fs_write_cache_pages\n                                      - f2fs_write_multi_pages\n                                       - f2fs_write_raw_pages\n                                        - f2fs_write_single_data_page\n                                          dn.data_blkaddr != COMPRESS_ADDR\n                                          (cluster converted to normal)\n    - f2fs_prepare_compress_overwrite\n     - f2fs_is_compressed_cluster\n       return 0\n     - return 0\n    - f2fs_bug_on(sbi, err == 0): BUG!\n\nWriteback path does not acquire i_gc_rwsem or filemap_invalidate_lock.\nWhen a compressed cluster fails compression during writeback, it is\noverwritten with raw data blocks. If Thread A checked\nf2fs_is_compressed_cluster() before the conversion, but calls\nf2fs_prepare_compress_overwrite() after the conversion,\nf2fs_prepare_compress_overwrite() returns 0 because the cluster is no\nlonger a compressed cluster.\n\nTo fix this, remove the f2fs_bug_on() and retry checking the cluster status\nwhen f2fs_prepare_compress_overwrite() returns 0, so that it can fall back\nto f2fs_do_truncate_blocks() to handle it as a normal cluster."
    }
  ],
  "id": "CVE-2026-139012",
  "lastModified": "2026-11-30T14:18:04.510",
  "metrics": {},
  "published": "2026-11-30T14:18:04.510",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/06e413468900775563b4c87169e28912c1855d30"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/305021c93f4457c56d899e858742860df7bf0b8b"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/3e82f85a40e71c0023408994f600fe862b83688d"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/3eae9d491339330d15c5a99e701d09646fb6e85c"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/9c7b917ffdf4be38d7074ddc23a39b4fe23dc1f7"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/c0337e331b065074ce20e4258a578e07dd7e4083"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/c0d77acef537dd3f0b1dcf94c9d0a265936d4ba6"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/c25c023fb531baf5e8ca57f2211aff6292506210"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Received"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

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.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.