{"api_version":"1","generated_at":"2026-11-30T19:52:22+00:00","cve":"CVE-2026-139438","urls":{"html":"https://cve.report/CVE-2026-139438","api":"https://cve.report/api/cve/CVE-2026-139438.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139438","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139438"},"summary":{"title":"block: use iomap_dirty_folio for block devices","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: use iomap_dirty_folio for block devices\n\nWith CONFIG_BUFFER_HEAD=n, block devices are written back through iomap,\nbut def_blk_aops uses filemap_dirty_folio, which only sets PG_dirty. It\ndoes not set the per-block dirty bits in the folio's iomap_folio_state,\nso iomap_writeback_folio() finds no dirty range, submits no I/O and\nclears PG_dirty, resulting in data loss.\n\nOther iomap users set .dirty_folio to iomap_dirty_folio, which marks the\nfolio's blocks dirty before calling filemap_dirty_folio().\n\nThis is only observable with block size < folio size. With a single\nblock there is no iomap_folio_state to get out of sync and\niomap_writeback_folio() marks the whole folio dirty itself. For a\npage-aligned device, this may require using the BLKBSZSET ioctl to set\nthe block size, which requires CAP_SYS_ADMIN. A device whose size is not\npage aligned already gets a sub-page block size from\nset_init_blocksize(), so no ioctl and no privilege is needed.\n\nTo reproduce, on a device with a sub-page block size, write a known\npattern with O_DIRECT, mmap the same range, store to it, msync() and\nfsync(), then read it back with O_DIRECT. A reproducer is available at\n[1].\n\n[1] https://gist.github.com/tzussman/18ab05cba4b3fdc79cce0a69d1fd05b4","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:14","updated_at":"2026-11-30 14:19:14"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/ee52ddbd70de6538262c29466a49a1f1b875aac5","name":"https://git.kernel.org/stable/c/ee52ddbd70de6538262c29466a49a1f1b875aac5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6d6239c59c38a1743abd835f97ba032dc1db943f","name":"https://git.kernel.org/stable/c/6d6239c59c38a1743abd835f97ba032dc1db943f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f2ee24d9e70b21d078273eac11a7b84aef7c3b78","name":"https://git.kernel.org/stable/c/f2ee24d9e70b21d078273eac11a7b84aef7c3b78","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/be1e33eda3e6699e57ed3fe6e34078f115b4a1ec","name":"https://git.kernel.org/stable/c/be1e33eda3e6699e57ed3fe6e34078f115b4a1ec","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2c163c18e8e2adf2f9ed865275ddcf50773e388a","name":"https://git.kernel.org/stable/c/2c163c18e8e2adf2f9ed865275ddcf50773e388a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139438","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139438","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 925c86a19bacf8ce10eb666328fb3fa5aff7b951 6d6239c59c38a1743abd835f97ba032dc1db943f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 925c86a19bacf8ce10eb666328fb3fa5aff7b951 ee52ddbd70de6538262c29466a49a1f1b875aac5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 925c86a19bacf8ce10eb666328fb3fa5aff7b951 f2ee24d9e70b21d078273eac11a7b84aef7c3b78 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 925c86a19bacf8ce10eb666328fb3fa5aff7b951 2c163c18e8e2adf2f9ed865275ddcf50773e388a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 925c86a19bacf8ce10eb666328fb3fa5aff7b951 be1e33eda3e6699e57ed3fe6e34078f115b4a1ec git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 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":["block/fops.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"6d6239c59c38a1743abd835f97ba032dc1db943f","status":"affected","version":"925c86a19bacf8ce10eb666328fb3fa5aff7b951","versionType":"git"},{"lessThan":"ee52ddbd70de6538262c29466a49a1f1b875aac5","status":"affected","version":"925c86a19bacf8ce10eb666328fb3fa5aff7b951","versionType":"git"},{"lessThan":"f2ee24d9e70b21d078273eac11a7b84aef7c3b78","status":"affected","version":"925c86a19bacf8ce10eb666328fb3fa5aff7b951","versionType":"git"},{"lessThan":"2c163c18e8e2adf2f9ed865275ddcf50773e388a","status":"affected","version":"925c86a19bacf8ce10eb666328fb3fa5aff7b951","versionType":"git"},{"lessThan":"be1e33eda3e6699e57ed3fe6e34078f115b4a1ec","status":"affected","version":"925c86a19bacf8ce10eb666328fb3fa5aff7b951","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["block/fops.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.6"},{"lessThan":"6.6","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","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.6.163","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: use iomap_dirty_folio for block devices\n\nWith CONFIG_BUFFER_HEAD=n, block devices are written back through iomap,\nbut def_blk_aops uses filemap_dirty_folio, which only sets PG_dirty. It\ndoes not set the per-block dirty bits in the folio's iomap_folio_state,\nso iomap_writeback_folio() finds no dirty range, submits no I/O and\nclears PG_dirty, resulting in data loss.\n\nOther iomap users set .dirty_folio to iomap_dirty_folio, which marks the\nfolio's blocks dirty before calling filemap_dirty_folio().\n\nThis is only observable with block size < folio size. With a single\nblock there is no iomap_folio_state to get out of sync and\niomap_writeback_folio() marks the whole folio dirty itself. For a\npage-aligned device, this may require using the BLKBSZSET ioctl to set\nthe block size, which requires CAP_SYS_ADMIN. A device whose size is not\npage aligned already gets a sub-page block size from\nset_init_blocksize(), so no ioctl and no privilege is needed.\n\nTo reproduce, on a device with a sub-page block size, write a known\npattern with O_DIRECT, mmap the same range, store to it, msync() and\nfsync(), then read it back with O_DIRECT. A reproducer is available at\n[1].\n\n[1] https://gist.github.com/tzussman/18ab05cba4b3fdc79cce0a69d1fd05b4"}],"providerMetadata":{"dateUpdated":"2026-11-30T13:34:45.484Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/6d6239c59c38a1743abd835f97ba032dc1db943f"},{"url":"https://git.kernel.org/stable/c/ee52ddbd70de6538262c29466a49a1f1b875aac5"},{"url":"https://git.kernel.org/stable/c/f2ee24d9e70b21d078273eac11a7b84aef7c3b78"},{"url":"https://git.kernel.org/stable/c/2c163c18e8e2adf2f9ed865275ddcf50773e388a"},{"url":"https://git.kernel.org/stable/c/be1e33eda3e6699e57ed3fe6e34078f115b4a1ec"}],"title":"block: use iomap_dirty_folio for block devices","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139438","datePublished":"2026-11-30T13:34:45.484Z","dateReserved":"2026-11-30T13:22:15.933Z","dateUpdated":"2026-11-30T13:34:45.484Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:14","lastModifiedDate":"2026-11-30 14:19:14","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139438","Ordinal":"1","Title":"block: use iomap_dirty_folio for block devices","CVE":"CVE-2026-139438","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139438","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: use iomap_dirty_folio for block devices\n\nWith CONFIG_BUFFER_HEAD=n, block devices are written back through iomap,\nbut def_blk_aops uses filemap_dirty_folio, which only sets PG_dirty. It\ndoes not set the per-block dirty bits in the folio's iomap_folio_state,\nso iomap_writeback_folio() finds no dirty range, submits no I/O and\nclears PG_dirty, resulting in data loss.\n\nOther iomap users set .dirty_folio to iomap_dirty_folio, which marks the\nfolio's blocks dirty before calling filemap_dirty_folio().\n\nThis is only observable with block size < folio size. With a single\nblock there is no iomap_folio_state to get out of sync and\niomap_writeback_folio() marks the whole folio dirty itself. For a\npage-aligned device, this may require using the BLKBSZSET ioctl to set\nthe block size, which requires CAP_SYS_ADMIN. A device whose size is not\npage aligned already gets a sub-page block size from\nset_init_blocksize(), so no ioctl and no privilege is needed.\n\nTo reproduce, on a device with a sub-page block size, write a known\npattern with O_DIRECT, mmap the same range, store to it, msync() and\nfsync(), then read it back with O_DIRECT. A reproducer is available at\n[1].\n\n[1] https://gist.github.com/tzussman/18ab05cba4b3fdc79cce0a69d1fd05b4","Type":"Description","Title":"block: use iomap_dirty_folio for block devices"}]}}}