{"api_version":"1","generated_at":"2026-12-04T23:07:05+00:00","cve":"CVE-2026-138937","urls":{"html":"https://cve.report/CVE-2026-138937","api":"https://cve.report/api/cve/CVE-2026-138937.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138937","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138937"},"summary":{"title":"nilfs2: clear dirty flag on bdev buffers on log write failure","description":"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().","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:54","updated_at":"2026-11-30 14:17:54"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/a8377f82a969fe5e2230306b14dcbcc74086d9c2","name":"https://git.kernel.org/stable/c/a8377f82a969fe5e2230306b14dcbcc74086d9c2","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6faad04a002603d800134398fcd042b403b32d35","name":"https://git.kernel.org/stable/c/6faad04a002603d800134398fcd042b403b32d35","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/4dfa8994b7082ee56deccbc33ba508089d420f6f","name":"https://git.kernel.org/stable/c/4dfa8994b7082ee56deccbc33ba508089d420f6f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1a84e432d44262c36ae3dcc2aa6331a879ba1612","name":"https://git.kernel.org/stable/c/1a84e432d44262c36ae3dcc2aa6331a879ba1612","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138937","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138937","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 68142cb628f75a22f12fde9f5c0c69dfc1bdcf47 a8377f82a969fe5e2230306b14dcbcc74086d9c2 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 68142cb628f75a22f12fde9f5c0c69dfc1bdcf47 1a84e432d44262c36ae3dcc2aa6331a879ba1612 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 68142cb628f75a22f12fde9f5c0c69dfc1bdcf47 4dfa8994b7082ee56deccbc33ba508089d420f6f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 68142cb628f75a22f12fde9f5c0c69dfc1bdcf47 6faad04a002603d800134398fcd042b403b32d35 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.11","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.11 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/nilfs2/segment.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"a8377f82a969fe5e2230306b14dcbcc74086d9c2","status":"affected","version":"68142cb628f75a22f12fde9f5c0c69dfc1bdcf47","versionType":"git"},{"lessThan":"1a84e432d44262c36ae3dcc2aa6331a879ba1612","status":"affected","version":"68142cb628f75a22f12fde9f5c0c69dfc1bdcf47","versionType":"git"},{"lessThan":"4dfa8994b7082ee56deccbc33ba508089d420f6f","status":"affected","version":"68142cb628f75a22f12fde9f5c0c69dfc1bdcf47","versionType":"git"},{"lessThan":"6faad04a002603d800134398fcd042b403b32d35","status":"affected","version":"68142cb628f75a22f12fde9f5c0c69dfc1bdcf47","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/nilfs2/segment.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.11"},{"lessThan":"6.11","status":"unaffected","version":"0","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"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"6.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"6.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"6.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.11","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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()."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:26:22.132Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/a8377f82a969fe5e2230306b14dcbcc74086d9c2"},{"url":"https://git.kernel.org/stable/c/1a84e432d44262c36ae3dcc2aa6331a879ba1612"},{"url":"https://git.kernel.org/stable/c/4dfa8994b7082ee56deccbc33ba508089d420f6f"},{"url":"https://git.kernel.org/stable/c/6faad04a002603d800134398fcd042b403b32d35"}],"title":"nilfs2: clear dirty flag on bdev buffers on log write failure","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138937","datePublished":"2026-11-30T13:26:22.132Z","dateReserved":"2026-11-30T13:22:15.904Z","dateUpdated":"2026-11-30T13:26:22.132Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:54","lastModifiedDate":"2026-11-30 14:17:54","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138937","Ordinal":"1","Title":"nilfs2: clear dirty flag on bdev buffers on log write failure","CVE":"CVE-2026-138937","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138937","Ordinal":"1","NoteData":"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().","Type":"Description","Title":"nilfs2: clear dirty flag on bdev buffers on log write failure"}]}}}