{"id":"CVE-2026-138937","aliases":["CVE-2026-138937"],"related":[],"kind":"vulnerability","state":"published","title":"nilfs2: clear dirty flag on bdev buffers on log write failure","summary":"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().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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().","source":"cvelist"}],"published":"2026-11-30T13:26:22.132Z","modified":"2026-11-30T14:17:54.390Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"68142cb628f75a22f12fde9f5c0c69dfc1bdcf47","fixed":"a8377f82a969fe5e2230306b14dcbcc74086d9c2","status":"affected"},{"type":"git","introduced":"68142cb628f75a22f12fde9f5c0c69dfc1bdcf47","fixed":"1a84e432d44262c36ae3dcc2aa6331a879ba1612","status":"affected"},{"type":"git","introduced":"68142cb628f75a22f12fde9f5c0c69dfc1bdcf47","fixed":"4dfa8994b7082ee56deccbc33ba508089d420f6f","status":"affected"},{"type":"git","introduced":"68142cb628f75a22f12fde9f5c0c69dfc1bdcf47","fixed":"6faad04a002603d800134398fcd042b403b32d35","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.11","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/a8377f82a969fe5e2230306b14dcbcc74086d9c2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1a84e432d44262c36ae3dcc2aa6331a879ba1612","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4dfa8994b7082ee56deccbc33ba508089d420f6f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6faad04a002603d800134398fcd042b403b32d35","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138937","url":"https://www.cve.org/CVERecord?id=CVE-2026-138937","licence":"CVE Terms of Use","modified":"2026-11-30T13:26:22.132Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138937","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138937","licence":"Public domain","modified":"2026-11-30T14:17:54.390Z"}],"updatedAt":"2026-11-30T14:33:02.632Z","epss":{"score":0.00201,"percentile":0.10483,"date":"2026-12-01T12:00:22.000Z"}}