{"id":"CVE-2026-143021","state":"PUBLISHED","title":"dm snapshot: fix discard_granularity unit in snapshot_io_hints","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndm snapshot: fix discard_granularity unit in snapshot_io_hints\n\nsnapshot_io_hints() copies the snapshot store's chunk_size, which is\nin 512-byte sectors, into queue_limits.discard_granularity, which, like\nall other members of struct queue_limits, is in bytes.\n\nFor snapshots with a chunk size smaller than 512 sectors, e.g. the\n16 KiB (32-sector) chunks created by the syzkaller reproducer, the\nresulting granularity is smaller than a single sector.  When\ndm_calculate_queue_limits() then stacks the target limits into the\ntable limits:\n\n\tblk_stack_limits(limits, &ti_limits, 0)\n\nqueue_limit_discard_alignment() truncates that granularity to zero\nsectors and sector_div() divides by zero:\n\n  Oops: divide error: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:queue_limit_discard_alignment block/blk-settings.c:645 [inline]\n  RIP: 0010:blk_stack_limits+0x1105/0x2d00 block/blk-settings.c:916\n  Call Trace:\n   dm_calculate_queue_limits+0x70c/0x1510 drivers/md/dm-table.c:1823\n   dm_setup_md_queue+0x199/0x4f0 drivers/md/dm.c:2618\n   table_load+0x4fd/0x8a0 drivers/md/dm-ioctl.c:1661\n\nThe divide fault itself only became reachable when commit e924da7d6622\n(\"block: Drop granularity check in queue_limit_discard_alignment()\")\nremoved the check for a sub-sector granularity in v6.13.  Kernels\nbefore that returned a zero discard alignment instead of faulting, but\nthey still advertised a granularity 512 times too small.\n\nUse the same chunk_size << SECTOR_SHIFT conversion that\nio_overlaps_chunk() already applies to turn chunk_size into bytes.","publishedAt":"2026-12-03T09:17:56.010Z","updatedAt":"2026-12-03T09:17:56.010Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2e6023850e177dbaca21498ada04c5a5ac93f812","status":"affected","lessThan":"4e7d218bee0201216aab43823d9d010177e8e3ee","versionType":"git"},{"version":"2e6023850e177dbaca21498ada04c5a5ac93f812","status":"affected","lessThan":"d6fec458f06fd30d0cb3350ac772f161ca35866a","versionType":"git"},{"version":"2e6023850e177dbaca21498ada04c5a5ac93f812","status":"affected","lessThan":"7049ec6f8b4b8d1eabfceaf80fbf6be93075a910","versionType":"git"},{"version":"2e6023850e177dbaca21498ada04c5a5ac93f812","status":"affected","lessThan":"d7216d7be2bbfdf3312695b6e41a4fc7c5e22902","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/md/dm-snap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.3","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/md/dm-snap.c"]}],"references":["https://git.kernel.org/stable/c/4e7d218bee0201216aab43823d9d010177e8e3ee","https://git.kernel.org/stable/c/d6fec458f06fd30d0cb3350ac772f161ca35866a","https://git.kernel.org/stable/c/7049ec6f8b4b8d1eabfceaf80fbf6be93075a910","https://git.kernel.org/stable/c/d7216d7be2bbfdf3312695b6e41a4fc7c5e22902"],"weaknesses":[],"ingestedAt":"2026-12-03T09:26:06.073Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143021.json","commit":"9fd484e43f2e14021809e195d28c1172759faad0","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143021","state":"PUBLISHED","datePublished":"2026-12-03T09:17:56.010Z","dateUpdated":"2026-12-03T09:17:56.010Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.343Z"},"containers":{"cna":{"title":"dm snapshot: fix discard_granularity unit in snapshot_io_hints","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndm snapshot: fix discard_granularity unit in snapshot_io_hints\n\nsnapshot_io_hints() copies the snapshot store's chunk_size, which is\nin 512-byte sectors, into queue_limits.discard_granularity, which, like\nall other members of struct queue_limits, is in bytes.\n\nFor snapshots with a chunk size smaller than 512 sectors, e.g. the\n16 KiB (32-sector) chunks created by the syzkaller reproducer, the\nresulting granularity is smaller than a single sector.  When\ndm_calculate_queue_limits() then stacks the target limits into the\ntable limits:\n\n\tblk_stack_limits(limits, &ti_limits, 0)\n\nqueue_limit_discard_alignment() truncates that granularity to zero\nsectors and sector_div() divides by zero:\n\n  Oops: divide error: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:queue_limit_discard_alignment block/blk-settings.c:645 [inline]\n  RIP: 0010:blk_stack_limits+0x1105/0x2d00 block/blk-settings.c:916\n  Call Trace:\n   dm_calculate_queue_limits+0x70c/0x1510 drivers/md/dm-table.c:1823\n   dm_setup_md_queue+0x199/0x4f0 drivers/md/dm.c:2618\n   table_load+0x4fd/0x8a0 drivers/md/dm-ioctl.c:1661\n\nThe divide fault itself only became reachable when commit e924da7d6622\n(\"block: Drop granularity check in queue_limit_discard_alignment()\")\nremoved the check for a sub-sector granularity in v6.13.  Kernels\nbefore that returned a zero discard alignment instead of faulting, but\nthey still advertised a granularity 512 times too small.\n\nUse the same chunk_size << SECTOR_SHIFT conversion that\nio_overlaps_chunk() already applies to turn chunk_size into bytes."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2e6023850e177dbaca21498ada04c5a5ac93f812","status":"affected","lessThan":"4e7d218bee0201216aab43823d9d010177e8e3ee","versionType":"git"},{"version":"2e6023850e177dbaca21498ada04c5a5ac93f812","status":"affected","lessThan":"d6fec458f06fd30d0cb3350ac772f161ca35866a","versionType":"git"},{"version":"2e6023850e177dbaca21498ada04c5a5ac93f812","status":"affected","lessThan":"7049ec6f8b4b8d1eabfceaf80fbf6be93075a910","versionType":"git"},{"version":"2e6023850e177dbaca21498ada04c5a5ac93f812","status":"affected","lessThan":"d7216d7be2bbfdf3312695b6e41a4fc7c5e22902","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/md/dm-snap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.3","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/md/dm-snap.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/4e7d218bee0201216aab43823d9d010177e8e3ee"},{"url":"https://git.kernel.org/stable/c/d6fec458f06fd30d0cb3350ac772f161ca35866a"},{"url":"https://git.kernel.org/stable/c/7049ec6f8b4b8d1eabfceaf80fbf6be93075a910"},{"url":"https://git.kernel.org/stable/c/d7216d7be2bbfdf3312695b6e41a4fc7c5e22902"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:17:56.010Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"7.4-rc3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}