{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "68142cb628f75a22f12fde9f5c0c69dfc1bdcf47"
            },
            {
              "fixed": "a8377f82a969fe5e2230306b14dcbcc74086d9c2"
            },
            {
              "fixed": "1a84e432d44262c36ae3dcc2aa6331a879ba1612"
            },
            {
              "fixed": "4dfa8994b7082ee56deccbc33ba508089d420f6f"
            },
            {
              "fixed": "6faad04a002603d800134398fcd042b403b32d35"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.11.0"
            },
            {
              "fixed": "6.12.117"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.63"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138937.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: clear dirty flag on bdev buffers on log write failure\n\nSince the commit referenced in the Fixes tag stopped directly calling\ninode_attach_wb(), a dirty flag is set on buffers (with\nmark_buffer_dirty()) allocated to the backing device for segment\nsummaries and the super root block during log writes.\n\nWhile this dirty flag is cleared upon a successful log write, it remains\nuncleared if the log write fails.\n\nConsequently, when a log write fails, these backing device buffers are\nleft in an inconsistent state where their uptodate flag and the dirty\nflag of the containing page/folio are cleared, but the buffer's dirty\nflag remains as stale garbage.\n\nParticularly when the block size is smaller than the page size, if other\nbuffers on the same page/folio become dirty, this buffer unexpectedly\nbecomes a target for writeback again.  As a result, if the block is\nlater reused for other data or metadata, that contents risks being\ncorrupted.\n\nFix this issue by calling clear_buffer_dirty() for the backing device\nbuffers when aborting log writes in nilfs_abort_logs().",
  "id": "CVE-2026-138937",
  "modified": "2026-12-01T20:45:39.070088006Z",
  "published": "2026-11-30T13:26:22.132Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1a84e432d44262c36ae3dcc2aa6331a879ba1612"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/4dfa8994b7082ee56deccbc33ba508089d420f6f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/6faad04a002603d800134398fcd042b403b32d35"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a8377f82a969fe5e2230306b14dcbcc74086d9c2"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138937.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138937"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "nilfs2: clear dirty flag on bdev buffers on log write failure"
}